If cell contains a specific character, then TRUE, if not, then FALSE

megera716

Board Regular
Joined
Jan 3, 2013
Messages
139
Office Version
  1. 365
Platform
  1. Windows
This seems like an exceedingly simple problem but I'm having trouble applying my Google results to my situation.

I have a table full of sales data, with Invoice Numbers in Column C. In a formula I've got way over in Column X, I just want to say if Column C contains "A", "B", "C" or "D" is true, run one formula and if it it's false, run a different one. I've already got those formulas and don't need help with that, just how to write the logical test.

A lot of what I found on Google was checking a range for a value in a different cell but I don't have it set up that way and don't really want to.
 
Ok how about
Excel Formula:
=IF(ISERROR(RIGHT(C2)+0),formula1,formula2)
I know the logic is "backward", but you could also write it this way...
VBA Code:
=IF(ISNUMBER(0+RIGHT(C2)),formula2,formula1)
 
Upvote 0

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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