If if if

guscrouchend

Board Regular
Joined
May 11, 2010
Messages
94
Hi,

At the moment, a column is populated by:

=IF(ISERROR(MATCH($C5,PriceTable!$F$1:$F$9,0)),"Grad","Senior")

So, if the value in column C is one of the values in range PriceTable!$F$1:$F$9, then the cell is "Senior". If not, it is "Grad".

What I would like is to introduce the third value "Trial" if the value in column C contains an asterisk.

If it does not contain an asterisk, the cell must follow the above formula.

Does anyone know if or how this could be done?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

e17nel

New Member
Joined
Aug 9, 2010
Messages
17
Hello, if you want it to return Trial if the only thing in Column C is an * the try:

=IF(C5="*","Trial",IF(ISERROR(MATCH($C5,PriceTable!$F$1:$F$9,0)),"Grad","Senior"))


Hi,

At the moment, a column is populated by:

=IF(ISERROR(MATCH($C5,PriceTable!$F$1:$F$9,0)),"Grad","Senior")

So, if the value in column C is one of the values in range PriceTable!$F$1:$F$9, then the cell is "Senior". If not, it is "Grad".

What I would like is to introduce the third value "Trial" if the value in column C contains an asterisk.

If it does not contain an asterisk, the cell must follow the above formula.

Does anyone know if or how this could be done?
 

jardenp

Active Member
Joined
May 12, 2009
Messages
369
=IF(ISNUMBER(SEARCH("~*",C5)),"Trial", IF(ISERROR(MATCH($C5,PriceTable!$F$1:$F$9,0)),"Grad","Senior"))
 

jardenp

Active Member
Joined
May 12, 2009
Messages
369
Side note: searching for "*" will be interpreted as a wildcard search. You must add a tilda before the asterisk.

My formula above is not limited to the cell containing only an asterisk.
 

e17nel

New Member
Joined
Aug 9, 2010
Messages
17

ADVERTISEMENT

Actually, the "*" isn't interpreted as a wildcard unless you are donig the search formula. If you use the formula I suggested, it will return Trial if the only thing in the cell is an *.

However, your formula will cover if there are other things in the cell besides just an *.

Side note: searching for "*" will be interpreted as a wildcard search. You must add a tilda before the asterisk.

My formula above is not limited to the cell containing only an asterisk.
 

jardenp

Active Member
Joined
May 12, 2009
Messages
369
I only intended that as an explanation for why my formula included a tilda.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,837
Messages
5,833,918
Members
430,244
Latest member
Ireland1

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
Top