ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formula to return a value in column B conditional upon the value in Column A (https://www.excelbanter.com/excel-worksheet-functions/446217-formula-return-value-column-b-conditional-upon-value-column.html)

JackofAllTrades

Formula to return a value in column B conditional upon the value in Column A
 
Hi!

I'm trying to write a formula in column B to return the value of "NA" if column A say "North America", "EU" if column A says "Europe" and "APAC" if column A says "Asia Pacific".

I'm sure there's something online but I'm not sure how to look for the answer.

Any takers? Thanks in advance!

Gord Dibben[_2_]

Formula to return a value in column B conditional upon the value in Column A
 
There are other methods but here is one.

=IF(A1="","",LOOKUP(A1,{"Asia Pacific","Europe","North
America"},{"APAC","EU","NA"}))


Gord

On Fri, 1 Jun 2012 20:18:13 +0000, JackofAllTrades
wrote:


Hi!

I'm trying to write a formula in column B to return the value of "NA" if
column A say "North America", "EU" if column A says "Europe" and "APAC"
if column A says "Asia Pacific".

I'm sure there's something online but I'm not sure how to look for the
answer.

Any takers? Thanks in advance!


Spencer101

Quote:

Originally Posted by JackofAllTrades (Post 1602305)
Hi!

I'm trying to write a formula in column B to return the value of "NA" if column A say "North America", "EU" if column A says "Europe" and "APAC" if column A says "Asia Pacific".

I'm sure there's something online but I'm not sure how to look for the answer.

Any takers? Thanks in advance!

Two ways of doing this...

1) Nested IF statements

=IF(A1="North America","NA",IF(A1="Europe","EU",IF(A1="Asia Pacific","APAC","")))


2) Lookup table

Put a table somewhere in the workbook that has North America, Europe, South Pacific in one column and NA, EU, APAC in the corresponding cells of the next column. Then use VLOOKUP to return the relevant value.

Hope that helps.

JackofAllTrades

Thank you! I'm going to try the nested if statements!

Quote:

Originally Posted by Spencer101 (Post 1602312)
Two ways of doing this...

1) Nested IF statements

=IF(A1="North America","NA",IF(A1="Europe","EU",IF(A1="Asia Pacific","APAC","")))


2) Lookup table

Put a table somewhere in the workbook that has North America, Europe, South Pacific in one column and NA, EU, APAC in the corresponding cells of the next column. Then use VLOOKUP to return the relevant value.

Hope that helps.



All times are GMT +1. The time now is 08:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com