Nested If Statement

ExcelYetti

New Member
Joined
Mar 24, 2017
Messages
2
Hello

I'm trying to write a statement that does the following: If cell B4 contains the letter G, or F fill cell D6 with the word Included, if not leave D6 blank (G or F in B4 can be stand alone or within a string of characters/part number).

To the best of my knowledge the way to achieve this is a nested if statement. Here's what I have now in D6. It identify's the G, however, if there is no G, but an F it's not recognized the F.

=IF(ISNUMBER(SEARCH("G",B4)),"Included",IF(ISNUMBER(SEARCH("F",B4,)),"Inc",""))

Thanks in advance!
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Welcome to the Board!

You have an extra comma after the B4 in your second IF statement.
Remove that and it will work.
 
Upvote 0
You could also try this:

=IF(MIN(SEARCH({"F","G"},B4&"fg"))<=LEN(B4),"Included","")
 
Upvote 0
Welcome to the Board!

You have an extra comma after the B4 in your second IF statement.
Remove that and it will work.


I came up with same formula as OP but mime worked and I could not for the life of me spot what the difference was. I even used the EXACT formula and it said FALSE so I knew there was a difference
 
Upvote 0

Forum statistics

Threads
1,216,038
Messages
6,128,447
Members
449,453
Latest member
jayeshw

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