Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
multiple conditions
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. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
multiple conditions
Try,
=IF(B1<"",CHOOSE(B1,,,,,,,,,,"AB","XY"),"") Mike "Sanjiv" wrote: 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. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
multiple conditions
=INDEX({"AB","XY"},MATCH(B1,{10,11},0))
"Sanjiv" wrote: 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. |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
multiple conditions
If you only have those 2 different variables:
=IF(B1=10,"AB",IF(B1=11,"xy","")) If you have many variables then you should create a table and use a lookup formula. See this: http://contextures.com/xlFunctions02.html -- Biff Microsoft Excel MVP "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. |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SUMPRODUCT or INDEX/MATCH for multiple conditions and multiple rec | Excel Discussion (Misc queries) | |||
How do I add multiple values that match multiple conditions? | Excel Discussion (Misc queries) | |||
Multiple conditions and multiple return values | Excel Worksheet Functions | |||
Combining Text from multiple cells under multiple conditions | Excel Worksheet Functions | |||
How to multiple conditions to validate more than 2 conditions to . | Excel Worksheet Functions |