Wildcard and Nested IF Statements

madkinson

Board Regular
Joined
Dec 17, 2004
Messages
113
Office Version
  1. 365
Platform
  1. Windows
In Excel 2013, I'm trying to create a nested IF statement using wildcards. I have data similar to the following:

PC Unit Account
CMCPX 21002400 GOOD
CMOPX 21002400 BAD
CMOPX 70021160 GOOD
CMCPX 70021178 BAD
CMOPX 70021186 GOOD
CMCPX 21001599 GOOD
CMOPX 21003601 BAD

When "PC Unit" = "CMCPX", I want the 3rd column to say "Good" whenever "Account" (col B) is equal to "2100*"
When "PC Unit" = "CMOPX", I want the 3rd column to say "Good" whenever "Account" is equal to "7002*"
Any other combination of values should be marked as "Bad".
There can only be either one of the other listed values in col A.
Since there are multiple valid ACCOUNT values, I tried to use a"*" as a wildcard.

Try as I might, I cannot get a valid IF statement to work. I thought about using an INDEX/MATCH, but I don't know how to put the values into the INDEX. I've always referred to ranges instead.

I really would appreciate some assistance on this as the spreadsheet has about 55,000 rows and manually spotting bad values takes a REALLY long time.

Thanking you in advance,
Mark
 
@mark, thanks for the feedback.

@ron, no need to dwell on this, the OP got it going. We can leave it at gremlins.
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,216,484
Messages
6,130,936
Members
449,608
Latest member
jacobmudombe

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