Formula if cell contains certain letter?

b34r

New Member
Joined
Mar 17, 2009
Messages
8
Is there a formula in 2003 I could use that let's me perform a different equation if a cell contains a certain letter? eg:

"3400A"
"3400B"

Is there a way to use the IF function to say "If cell contains letter "B", multiply it by "reference cell", if not, just leave it. ?
 
Sorry, my table didn't perform properly in the post above. Here are the results:


InputOutput
310A
310B
310C
0
1
2

<tbody>
</tbody>

Phil
 
Upvote 0

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
I'm no expert, but I think if you nest the Find function you could achieve that.

=IF(ISNUMBER(FIND("B",A1)),1,IF(ISNUMBER(FIND("C",A1)),2,0))

With a quick test it produced these results:

InputOutput
310A0

<tbody>
</tbody>


Hope this helps,

Phil

Hi Phil,

I used your formula and it worked great. Do you know how you would set it up if you wanted to include lower case letters as well?

Thanks

Mel
 
Upvote 0

Forum statistics

Threads
1,215,700
Messages
6,126,281
Members
449,308
Latest member
VerifiedBleachersAttendee

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