Displaying IF statement result in another cell...

dariuzthepole

Board Regular
Joined
Jul 23, 2008
Messages
111
Hi All,

Is there a way to reference what decision has been made by an IF statement in another cell? E.g. IF statement is in cell A1. In cell A2, I want to display whether the IF statement has chosed the TRUE value of the FALSE value.

Can this be done? Any help would be greatly appreciated.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Strictly speaking it isn't in cell A1, but this is what I have...

=IF(Q23-(Q25+Q26)<0,(Q23-(Q25+Q26))*(-1),(Q23-(Q25+Q26)))

...for budget purposes, if the calculation produces a negative number, I want to display "Deficit" in the adjacent cell. At the same time, I don't want a negative number showing as a deficit (hence why the TRUE value in the above equation is multiplied by -1).

The above formula works perfectly. In the adjacent cell, I want to display either "Deficit" or "Surplus". I have a similar equation to the above...

=IF(K32>0,"Surplus","Deficit")

...but because the original formula converts all negative numbers to positive, it always displays "Surplus"!
 
Upvote 0
For your first formula, why not just use
Code:
=ABS((Q23-(Q25+Q26))
. For the second, use
Code:
=IF(Q23-(Q25+Q26)<0,"Deficit","Surplus")

lenze
 
Upvote 0
you could always go into the formatting and remove the - sign from there and display your negatives as red tx but with no sign?
 
Upvote 0
For your first formula, why not just use
Code:
=ABS((Q23-(Q25+Q26))
. For the second, use
Code:
=IF(Q23-(Q25+Q26)<0,"Deficit","Surplus")

lenze

This solves half of the problem. However, if the calculation brings a negative number it will still say "Surplus", as the negative element is disgarded using the ABS function.
 
Upvote 0
However, if the calculation brings a negative number it will still say "Surplus", as the negative element is disgarded using the ABS function.
Are you sure? My second formula doesn't use ABS
lenze
 
Upvote 0
The 2nd part of lenze's statement does the whole IF, so your going to get either a surplus or a deficit based on that and not based on what's displaying in the first part. the first part is seperate. You need to run both
 
Upvote 0

Forum statistics

Threads
1,214,598
Messages
6,120,441
Members
448,966
Latest member
DannyC96

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