ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Cell Population based on a Table (https://www.excelbanter.com/excel-discussion-misc-queries/81387-cell-population-based-table.html)

JimS

Cell Population based on a Table
 

How can I populate a cell based on "various values" of another cell?

Column A contains the 2-Character Abbreviations for all the States
(United States that is). I would like to populate Column B with the
“Area” that the state is in based on my predetermined mapping.

In example: MA, NJ, NY are in the East Area, VA, MD, NC, SC are in the
MidAtlantic Area, IL, ND, SD, IW are in the MidWest Area, TX, FL, LA
are in the South Area, etc

Can a formula do this or does it need a Macro. I would think that I
would need to build a reference table for the “States to Area”
mapping/relationship.


--
JimS
------------------------------------------------------------------------
JimS's Profile: http://www.excelforum.com/member.php...fo&userid=9876
View this thread: http://www.excelforum.com/showthread...hreadid=529644


Ardus Petus

Cell Population based on a Table
 
You do need a reference table with col States & col Area

Then you can search that table using VLOOKUP

HTH
--
AP

"JimS" a écrit dans le
message de ...

How can I populate a cell based on "various values" of another cell?

Column A contains the 2-Character Abbreviations for all the States
(United States that is). I would like to populate Column B with the
"Area" that the state is in based on my predetermined mapping.

In example: MA, NJ, NY are in the East Area, VA, MD, NC, SC are in the
MidAtlantic Area, IL, ND, SD, IW are in the MidWest Area, TX, FL, LA
are in the South Area, etc

Can a formula do this or does it need a Macro. I would think that I
would need to build a reference table for the "States to Area"
mapping/relationship.


--
JimS
------------------------------------------------------------------------
JimS's Profile:

http://www.excelforum.com/member.php...fo&userid=9876
View this thread: http://www.excelforum.com/showthread...hreadid=529644




Dave Peterson

Cell Population based on a Table
 
I would create a new worksheet (call it sheet2).

Put the 2 character abbreviation in column A and its associated region in column
B.

Then I'd use a formula in an adjacent cell:

=if(a2="","",vlookup(a2,sheet2!a:b,2,false))



JimS wrote:

How can I populate a cell based on "various values" of another cell?

Column A contains the 2-Character Abbreviations for all the States
(United States that is). I would like to populate Column B with the
“Area” that the state is in based on my predetermined mapping.

In example: MA, NJ, NY are in the East Area, VA, MD, NC, SC are in the
MidAtlantic Area, IL, ND, SD, IW are in the MidWest Area, TX, FL, LA
are in the South Area, etc

Can a formula do this or does it need a Macro. I would think that I
would need to build a reference table for the “States to Area”
mapping/relationship.

--
JimS
------------------------------------------------------------------------
JimS's Profile: http://www.excelforum.com/member.php...fo&userid=9876
View this thread: http://www.excelforum.com/showthread...hreadid=529644


--

Dave Peterson


All times are GMT +1. The time now is 02:29 PM.

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