Solved

Excel formula if

Posted on 2016-07-17
10
64 Views
Last Modified: 2016-07-18
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
0
Comment
Question by:W.E.B
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 8

Assisted Solution

by:itjockey
itjockey earned 250 total points
ID: 41715981
Try something like this or post sample Work book.

=IF(ISERROR(FIND("Resident",AK2,1))=TRUE,0,AM2+3)

Open in new window


Thanks
0
 

Author Comment

by:W.E.B
ID: 41715983
Thank you, this worked,
=IF(ISERROR(FIND("RESIDENCE",AK2,1))=TRUE,AM2,AM2+3)

how do I add to the formula
RESIDENTIAL
RESIDENT
0
 
LVL 29

Accepted Solution

by:
Subodh Tiwari (Neeraj) earned 250 total points
ID: 41715984
Does column AK contains some leasing spaces in them?

BTW try this....

=IF(OR(LEFT(TRIM(AK2),8)="RESIDENT",LEFT(TRIM(AK2),9)="RESIDENCE",LEFT(TRIM(AK2),11)="RESIDENTIAL"),AM2+3,AM2+2)

Open in new window


If that doesn't work for you, please upload a sample workbook with some dummy data.
1
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 29

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41715987
Or you can also try this....

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

Open in new window

0
 

Author Comment

by:W.E.B
ID: 41715988
thank you very much.
0
 

Author Closing Comment

by:W.E.B
ID: 41715990
thanks
0
 
LVL 29

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41715991
You're welcome.
0
 
LVL 8

Expert Comment

by:itjockey
ID: 41715992
@Subodh Tiwari (Neeraj)...Thumbs Up ....this is how i learnt .....Thanks
@ Wass_QA  mine formula wont work for your all condition.
0
 
LVL 29

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41715993
@itjockey

Glad you found it helpful. :)
0
 
LVL 32

Expert Comment

by:Rob Henson
ID: 41717402
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
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question