Rodrigo Kroehn
Rodrigo Kroehn

Reputation: 31

How to use plus or minus in a cell inside a formula in another cell

I'm trying to do some stuff with solver but the results I need, I need to put the operators to the formula in another cell. So, to be pratical, should be some like this:

A1 = <
A2 = >
A3 = <=
A4 = >=
B1 = 20
B2 = 30
C1 = =B1&A1&B2

The formula needs to understand the the data inside A1 to A4 are operators. Any ideas?

Thanks!

Upvotes: 0

Views: 339

Answers (1)

SilentRevolution
SilentRevolution

Reputation: 1513

As far as I'm aware, you can't do this in the traditional sense. What you can however do, is the following.

  1. Select cell "C1"
  2. Go to the formulas tab
  3. Define a name
  4. Name it something descriptive, like "Eval1" or whatever
  5. Refer it to =EVALUATE(Sheet3!$A2&Sheet3!A$1&Sheet3!$B2)

Be aware that this uses relative selection, writing =Eval1 in cell G2 would not work in this case because it would try and evaluate A2 & E1 & B2 but can work if you adapt the refer to of eval1 in the name manager.

Results

Upvotes: 1

Related Questions