Formula with conditions

olivier

New Member
Joined
Feb 17, 2002
Messages
9
Hi,

I am looking for the following formula:
Col a col b
10 B
12
15. B
16
20. V
25

Column a represents numbers and column b represents letters B or V. I'm looking for a formula in column C that would calculate a division each time it encounters the first
B letter ignoring any subsequent B letters and the letter V. In the example above,
The calculation will be 20/10. Thx.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Does this help?


Excel 2010
ABC
1ColAColB
210B2
312
415B
516
620V
725
Sheet1
Cell Formulas
RangeFormula
C2=INDEX(A2:A7,MATCH("V",B2:B7,FALSE))/INDEX(A2:A7,MATCH("B",B2:B7,FALSE))
 
Upvote 0
Thanks Andrew. It does help. When I copy the formula for the whole column c, it calculates something even if there is no letter in column b. I guess I need to exclude blank cells from the calculation. Also it does calculate if it finds another B between the original B and V section. Thanks for your help.
 
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,240
Members
448,555
Latest member
RobertJones1986

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