I need an if formula

tlbgto

New Member
Joined
Mar 3, 2011
Messages
17
I need a formula for the following

If column e= column f answer x
If column e doesn't equal f answer is s, unless column f is p then answer is p.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
I have no doubt there's a prettier way, but I would use:

let's say you had the formula in column a:
in A1 use: =if(e1=f1,"x",if(e1=p1,"p","s"))

Should do the trick :D
 
Upvote 0
Those formulas don't seem to be working a the p is a letter and not a column.

If column e equals column f answer is x
If column e does not equal column f the answer is s, unless column f contains the letter p in which case the answer would be p.

Is a formula possible like that?
 
Upvote 0
It comes back with an error name. Does not recognize text in a formula. If I enter a number say 15 instead of p it works fine.
 
Upvote 0
I think I found the problem. It appears that it is in the formatting. On a blank excel it works, but on the data drop it does not. Thanks for all the help.
 
Upvote 0
Yeh, are if you are exporting the report from outside source (ie Oracle Business Object or downloading it from somewhere) it can be a crazy format, I run into that sometimes.
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,799
Members
452,943
Latest member
Newbie4296

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