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

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
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?
 
Upvote 0
=IF(ISNUMBER(SEARCH("~*",C5)),"Trial", IF(ISERROR(MATCH($C5,PriceTable!$F$1:$F$9,0)),"Grad","Senior"))
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0
I only intended that as an explanation for why my formula included a tilda.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

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