If function to evaluate another formula

Peteor

Board Regular
Joined
Mar 16, 2018
Messages
152
I have the following in cell M2:

=IF(($J$29-$J$28)<=7,$X$4+$X$2,$X$2)

I would like to create the following which references cell M2:

=IF(M2<>"1610.59","602.8","")

The problem I believe I am having is the 2nd If statement is evaluating a formula, rather than the actual cell value. How do I tell Excel to evaluate the value, rather than the first formula?
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
You don't need to tell Excel to use the value, it already does that. When dealing with less than, greater than or equals, Excel expects to compare numbers, whereas you are using strings b/c you have enclosed the comparison value in quote marks. Try:

=IF(M2<>1610.59,602.8,"")
 
Upvote 0
I don't follow your logic.
The 2nd if statement is acting on the RESULT of the formula in M2
Can you post an example of the problem ??
 
Upvote 0
Thank you Joe. I always overcomplicate. Been staring at this 4 hours. I was evaluating numbers as strings, and wondering why it would not work.
 
Upvote 0
Thank you Joe. I always overcomplicate. Been staring at this 4 hours. I was evaluating numbers as strings, and wondering why it would not work.
You are welcome - thanks for the reply.
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,226
Members
452,620
Latest member
dsubash

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