View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein \(MVP - VB\)[_1081_] Rick Rothstein \(MVP - VB\)[_1081_] is offline
external usenet poster
 
Posts: 1
Default multiple conditions

As you are seeing from the responses, there are usually many different ways
to code a solution, some more efficient than others. It is always a good
idea to NOT simplify your examples as you apparently have done in your
question... there is no way to know what the most efficient solution is if
we do not know what you actually have to work with. I mean, if your posted
question was exactly what you really needed, then even this might could be
the correct answer for you...

=MID("ABxy",2*(B1-10)+1,2)

Rick


"Sanjiv" wrote in message
...
I have :

A B
1 10
2
3 11
4 11
5 10

I want to write a formula in Col A that
If B=10 then in col A1= have a value say "AB"
if B=11 then in col A1= have a value say "xy"
else
Col A1=blank

Kindly help and many thanks for that.