What's wrong with this simple nested formula?

philia

New Member
Joined
Apr 9, 2011
Messages
19
I'm basically trying to say if a cell (E2) reads "positive" or "negative", then apply this equation. What am I doing wrong? Here it is:

=IF(E2="positive"),=(D2-F2/G2-D2), IF(E2="negative",=(F2-D2/G2-D2)))

Thank you.
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hi,

If E2 can only be either positive or negative with no blanks, the following should work

=IF(E2="positive",(D2-F2)/(G2-D2),(F2-D2)/(G2-D2))

Regards,
Ian
 
Upvote 0
Judging by the only difference between the True and False formula is you switch D2-F2 to F2-D2.
I would guess you have a formula in E2 that tells you weather one of them is negative or positive...right...

Try this instead of all that..

=ABS(D2-F2)/(G2-D2)


Hope that helps.
 
Upvote 0
Sorry, I think I wasn't clear. The cell itself will either have the word "positive" or the word "negative" in it.

Hi,

If E2 can only be either positive or negative with no blanks, the following should work

=IF(E2="positive",(D2-F2)/(G2-D2),(F2-D2)/(G2-D2))

Regards,
Ian
 
Upvote 0

Forum statistics

Threads
1,224,574
Messages
6,179,626
Members
452,933
Latest member
patv

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