Link to home
Create AccountLog in
Avatar of W.E.B
W.E.B

asked on

Excel formula if

Hello,
can you please help,
I'm trying to say, if left of cell like then
=IF(LEFT(AK2,10)="RESIDENCE",AM2+3,IF(LEFT(AK2,11)="RESIDENTIAL",AM2+3,IF(LEFT(AK2,9)="RESIDENT",AM2+3,AM2)))

it seems to work only on exact words.
Example
if the cells was
RESIDENCE_____
RESIDENTIAL ---
RESIDENT yes

formula doesn't work.
thanks
SOLUTION
Avatar of Naresh Patel
Naresh Patel
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of W.E.B
W.E.B

ASKER

Thank you, this worked,
=IF(ISERROR(FIND("RESIDENCE",AK2,1))=TRUE,AM2,AM2+3)

how do I add to the formula
RESIDENTIAL
RESIDENT
ASKER CERTIFIED SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Or you can also try this....

=IF(OR(ISNUMBER(SEARCH({"Residence","Resident","Residential"},AK2))),AM2+3,AM2+2)

Open in new window

Avatar of W.E.B

ASKER

thank you very much.
Avatar of W.E.B

ASKER

thanks
You're welcome.
@Subodh Tiwari (Neeraj)...Thumbs Up ....this is how i learnt .....Thanks
@ Wass_QA  mine formula wont work for your all condition.
@itjockey

Glad you found it helpful. :)
Don't know if this would have helped but your original formula had incorrect character lengths for two of the options:

LEFT(AK2,10)="RESIDENCE"  but RESIDENCE = 9
LEFT(AK2,11)="RESIDENTIAL" correct as RESIDENTIAL = 11
LEFT(AK2,9)="RESIDENT" but RESIDENT = 8