Formula needed for a cell

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,226
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
I have 2 cells as below:
Sheet1

BC
DS

<colgroup><col style="FONT-WEIGHT: bold; WIDTH: 30px"><col style="WIDTH: 64px"><col style="WIDTH: 64px"></colgroup><tbody>
[TD="bgcolor: #cacaca, align: center"]2[/TD]

[TD="bgcolor: #ffff00"] [/TD]

</tbody>

I want:
C2=100 if B2 contains either of "B" or "C" or "Q" or "R"
C2=200 if B2 contains either of "D" or "S"
ELSE C2=300

FORMULA REQUIRED FOR C2?
Thanks in adv.
 
Give this a try:

=IF(COUNT(FIND({"B","C","Q","R"},B2))>0,100,IF(COUNT(FIND({"D","S"},B2))>0,200,300))
 
Upvote 0
Give this a try:

=IF(COUNT(FIND({"B","C","Q","R"},B2))>0,100,IF(COUNT(FIND({"D","S"},B2))>0,200,300))

Can it be expanded to...
C2=100 if B2 contains either of "B" or "Q"
C2=200 if B2 contains either of "C" or "R"
C2=300 if B2 contains either of "D" or "S"
ELSE C2=400
 
Upvote 0
Will there ever be a situation in which B2 contains a letter from 2 different categories (ex: "B" and "D"). If so, what should the result in C2 be?
 
Upvote 0
will there ever be a situation in which b2 contains a letter from 2 different categories (ex: "b" and "d") no it won't be. If so, what should the result in c2 be?
no it won't be
 
Upvote 0
This should work:

=100*IFERROR(ROUNDUP(MATCH(10^9,FIND({"B","Q","C","R","D","S"},B2),1)/2,),4)
 
Upvote 0

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