Need help on the excel formula

brian8989

New Member
Joined
Feb 18, 2016
Messages
26
Hi Excel Experts,

I wish to create a formula which if H4 contains Greater, then A4-C4, otherwise C4-A4. I do not know why the formula below did not work (highlighted in RED), hence, I need your kind assistance on this issue.

=IF(ISNUMBER(SEARCH("Greater",H4))," =ASB(A4-C4) ","=ASB(C4-A4)")




Thank you in advance!

Regards,
Brian
 
Last edited:

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi Jmacleary,

Thank you for the help. What if I want the number to be always positive?

For instance, A4 = 100, C4 = 50

C4-A4, and I want the result to be positive.


Thanks and Regards,
Brian
 
Upvote 0
In that case, you dont need the IF clause at all, just code =ABS(A4-C4)
 
Upvote 0

Forum statistics

Threads
1,214,973
Messages
6,122,534
Members
449,088
Latest member
RandomExceller01

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