Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default How to auto populate many cells based on one cell

I have a sheet that lists all 50 states in Column A and several different
ciities in Row 1. In all the corresponding cells it is stated whether the
listed city is 12, 24 or 36 hours away from a particular state.

My question is this: on another worksheet I want to be able to select one of
the cities from a drop down which will auto populate those states that fall
within 12, 24 or 36 hours. Make sense?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default How to auto populate many cells based on one cell

Here's a sample formulas play which will deliver the required functionalities
The source ("cross-tab") table below is assumed in sheet: x, in A1:D10

City1 City2 City3
State1 36 24 12
State2 24 24 12
State3 36 24 36
State4 24 12 24
State5 12 24 36
State6 24 24 36
State7 24 12 24
State8 24 24 12
State9 12 36 24

Then in another sheet,
In A1 is a DV droplist to select the city, eg: City2
In E1:G1 are the 3 "hours" col headers, ie: 12, 24, 36

In B2:
=IF(OFFSET(x!$A$1,ROWS($1:1),MATCH($A$1,x!$B$1:$D$ 1,0))=E$1,ROW(),"")
Copy B2 to D2, fill down to D10. Minimize/hide cols B to D.

In E2:
=IF(ROWS($1:1)COUNT(B:B),"",INDEX(x!$A:$A,SMALL(B :B,ROWS($1:1))))
Copy E2 to G2, fill down to G10 to populate. All the states for the city
selected in A1 will display within E2:G10, grouped under the corresponding
"hours" header & neatly packed at the top, viz it'll display for example as:

City2 12 24 36
State4 State1 State9
State7 State2
State3
State5
State6
State8


voila? hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"Banshee" wrote:
I have a sheet that lists all 50 states in Column A and several different
ciities in Row 1. In all the corresponding cells it is stated whether the
listed city is 12, 24 or 36 hours away from a particular state.

My question is this: on another worksheet I want to be able to select one of
the cities from a drop down which will auto populate those states that fall
within 12, 24 or 36 hours. Make sense?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default How to auto populate many cells based on one cell

Max,
Thank you, that seems to work great. I only have one problem now. I have set
it up just as you described only I listed all fifty states plus Washington
DC, so my rows go down to 52. Additionally I have 10 cities listed across the
top row. I have made some edits to the formulas to account for this however
when I select a city from the drop down only the 12 hour column fills in, the
24 and 36 fill in with #REF!. Here are the formulas I used:

In cell B2 =IF(OFFSET('Scenarios (2)'!$A$1,ROWS($1:1),MATCH($A$1,'Scenarios
(2)'!$B$1:$K$1,0))=L$1,ROW(),"")

In cell L2 =IF(ROWS($1:1)COUNT(B:B),"",INDEX('Scenarios
(2)'!$A:A,SMALL(B:B,ROWS($1:1))))

If you can help me out with this I should have it. Thanks again.
"Max" wrote:

Here's a sample formulas play which will deliver the required functionalities
The source ("cross-tab") table below is assumed in sheet: x, in A1:D10

City1 City2 City3
State1 36 24 12
State2 24 24 12
State3 36 24 36
State4 24 12 24
State5 12 24 36
State6 24 24 36
State7 24 12 24
State8 24 24 12
State9 12 36 24

Then in another sheet,
In A1 is a DV droplist to select the city, eg: City2
In E1:G1 are the 3 "hours" col headers, ie: 12, 24, 36

In B2:
=IF(OFFSET(x!$A$1,ROWS($1:1),MATCH($A$1,x!$B$1:$D$ 1,0))=E$1,ROW(),"")
Copy B2 to D2, fill down to D10. Minimize/hide cols B to D.

In E2:
=IF(ROWS($1:1)COUNT(B:B),"",INDEX(x!$A:$A,SMALL(B :B,ROWS($1:1))))
Copy E2 to G2, fill down to G10 to populate. All the states for the city
selected in A1 will display within E2:G10, grouped under the corresponding
"hours" header & neatly packed at the top, viz it'll display for example as:

City2 12 24 36
State4 State1 State9
State7 State2
State3
State5
State6
State8


voila? hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"Banshee" wrote:
I have a sheet that lists all 50 states in Column A and several different
ciities in Row 1. In all the corresponding cells it is stated whether the
listed city is 12, 24 or 36 hours away from a particular state.

My question is this: on another worksheet I want to be able to select one of
the cities from a drop down which will auto populate those states that fall
within 12, 24 or 36 hours. Make sense?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default How to auto populate many cells based on one cell

Nevermind about my last question. I've got it. This is exaclty what I was
looking for, thanks a lot!

"Max" wrote:

Here's a sample formulas play which will deliver the required functionalities
The source ("cross-tab") table below is assumed in sheet: x, in A1:D10

City1 City2 City3
State1 36 24 12
State2 24 24 12
State3 36 24 36
State4 24 12 24
State5 12 24 36
State6 24 24 36
State7 24 12 24
State8 24 24 12
State9 12 36 24

Then in another sheet,
In A1 is a DV droplist to select the city, eg: City2
In E1:G1 are the 3 "hours" col headers, ie: 12, 24, 36

In B2:
=IF(OFFSET(x!$A$1,ROWS($1:1),MATCH($A$1,x!$B$1:$D$ 1,0))=E$1,ROW(),"")
Copy B2 to D2, fill down to D10. Minimize/hide cols B to D.

In E2:
=IF(ROWS($1:1)COUNT(B:B),"",INDEX(x!$A:$A,SMALL(B :B,ROWS($1:1))))
Copy E2 to G2, fill down to G10 to populate. All the states for the city
selected in A1 will display within E2:G10, grouped under the corresponding
"hours" header & neatly packed at the top, viz it'll display for example as:

City2 12 24 36
State4 State1 State9
State7 State2
State3
State5
State6
State8


voila? hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"Banshee" wrote:
I have a sheet that lists all 50 states in Column A and several different
ciities in Row 1. In all the corresponding cells it is stated whether the
listed city is 12, 24 or 36 hours away from a particular state.

My question is this: on another worksheet I want to be able to select one of
the cities from a drop down which will auto populate those states that fall
within 12, 24 or 36 hours. Make sense?

  #5   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default How to auto populate many cells based on one cell

Welcome, glad to hear
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"Banshee" wrote in message
...
Nevermind about my last question. I've got it. This is exaclty what I was
looking for, thanks a lot!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to auto-populate worksheet based on cell entry? tgcali Excel Discussion (Misc queries) 4 April 13th 09 04:11 PM
Auto populate a cell based off a look up table jrt Excel Discussion (Misc queries) 2 April 30th 08 04:25 PM
How do I Auto Populate a cell with a chart based on a value Bryan[_2_] Excel Worksheet Functions 0 March 24th 07 01:03 AM
Auto populate several cells based on a selection from drop down li Sheldon Excel Discussion (Misc queries) 3 January 13th 06 08:12 PM
Auto populate cells based on 2 cells division. Chance224 Excel Discussion (Misc queries) 0 April 4th 05 09:35 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"