@if formula [Solved/Closed]

Report
Posts
2
Registration date
Wednesday October 7, 2015
Status
Member
Last seen
October 8, 2015
-
Posts
1010
Registration date
Saturday January 17, 2015
Status
Moderator
Last seen
June 16, 2020
-
Hello,

how do i formulate the following:-
if cell B12 contains the word Meals, then I want to use the formula F12/2 else take 100% in F12

1 reply

Posts
1010
Registration date
Saturday January 17, 2015
Status
Moderator
Last seen
June 16, 2020
244
Hi junebugs65,

Try this ...

=IF(B12="meals",F12/2,F12)

Paste this into any cell except B12 or F12 and it should work in the cell its pasted into.

I really appreciate thank you messages as a payment for solving issues :o)
Hi Brian

Thank you for getting back to me so quickly. It only works if it finds the exact word "meals'. Sometimes the cell can contain a different string like "staff meals' or "hotel and meals". How would I deal with that?
Posts
1010
Registration date
Saturday January 17, 2015
Status
Moderator
Last seen
June 16, 2020
244
Hi Junebugs65,

Try this instead.

=IF(ISNUMBER(SEARCH("meals",B12)),F12/2,F12)


Hope this works for you. - let us know :^)
Posts
2
Registration date
Wednesday October 7, 2015
Status
Member
Last seen
October 8, 2015
>
Posts
1010
Registration date
Saturday January 17, 2015
Status
Moderator
Last seen
June 16, 2020

Hi Brian

YES! it works. I didn't quite know how to use the ISNUMBER function, tried to Google but couldn't find what I was looking for.
Thanks Brian. I'm sure you'll hear from me again.
Posts
1010
Registration date
Saturday January 17, 2015
Status
Moderator
Last seen
June 16, 2020
244 >
Posts
2
Registration date
Wednesday October 7, 2015
Status
Member
Last seen
October 8, 2015

Im glad its all sorted. Thanks for letting us know how it went. ... and anytime there is a problem dont hesitate to get in touch :^)