How to Parameterize a symbol?

Pobek

Board Regular
Joined
Jul 7, 2015
Messages
99
Hi,

Let's say I have 10 in cell A1 and 11 in B1. If I put in the formulae "=A1<B1" into cell C1, I'll get a TRUE! I want to be able to make the symbol "<" a parameter such that I can put say (in C1):

"=A1indirect(D1)B1" with the "<" inputted in D1 to still be able to maintain the formulae integrity ... Does anyone have a clever formulae to make this possible?
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Sorry I must have cut out some of that information... here is what I initially typed:

Hi,

Let's say I have 10 in cell A1 and 11 in B1. If I put in the formulae "=A1<B1" ijn C1, I get a TRUE. I'd like to make the symbol "<" a parameter such that I can put in
"=A1indirect(D1)B1" (with the "<" inputted in D1) to still be able to maintain the formulae integrity ... Does anyone have a clever formulae to make this possible?
 
Last edited by a moderator:
Upvote 0
You can fudge it by building the string and then copying pasting and reentering the formula.
 
Upvote 0
You could also create a simple UDF in VBA to evaluate your formula.
 
Upvote 0
Heres a function that works. Rory will be able to say if i missed anything:

Code:
Function eval(first As Range, oper As Range, last As Range)

eval = Evaluate("=" & first & oper & last)

End Function
 
Upvote 0
Another work-around would use Names
Put 12 in A1, "<" in B1 and 36 in C1..


Select D1 and define a name,
Name: myEquation
RefersTo: =EVALUATE(Sheet1!A1 & Sheet1!B1 & Sheet1!C1)

Then put =myEquation in D1.

Because of the use of relative refenecing in the definition, dragging D1 downward will adjust to the row number
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,287
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top