Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Populate cells based on key cell

I have two sheets, X and Y set up as follows:

Y:
A1:B1 contain column headers
A2:A10 contain levels, 1 through 5 in random order
B2:B10 contain strings

Example:
Level String
1 Test1
4 Test2
3 Test3
2 Test4
1 Test5
2 Test6
5 Test7
3 Test8
1 Test9

X:
B2 contains a number, 1 through 5.

Example: 2

I need to populate X A4:A* with all entries Y B2:B10 where Y A2:A10 <= B2

Desired output would be:
Test1
Test4
Test5
Test6
Test9

I'm sorry if this is confusing, and I appreciate any help you can offer.

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Populate cells based on key cell

In SheetY cell C1 enter the header "seq", and put this formula in C2:

=IF(OR(A2="",A2<SheetX!B$2),"",COUNTIF(A$2:A2,"=" &SheetX!B$2))

Copy this down as far as you need to (even beyond the data in columns
A and B if they are likely to grow).

Then put this formula in A4 of SheetX:

=IF(ISNA(MATCH(ROW(A1),SheetY!C:C,0)),"",INDEX(She etY!B:B,MATCH(ROW
(A1),SheetY!C:C,0)))

and copy this down as far as you think you will need it.

Hope this helps.

Pete


On Sep 8, 3:52*pm, Banshee wrote:
I have two sheets, X and Y set up as follows:

Y:
A1:B1 contain column headers
A2:A10 contain levels, 1 through 5 in random order
B2:B10 contain strings

Example:
Level String
1 Test1
4 Test2
3 Test3
2 Test4
1 Test5
2 Test6
5 Test7
3 Test8
1 Test9

X:
B2 contains a number, 1 through 5.

Example: 2

I need to populate X A4:A* with all entries Y B2:B10 where Y A2:A10 <= B2

Desired output would be:
Test1
Test4
Test5
Test6
Test9

I'm sorry if this is confusing, and I appreciate any help you can offer.

Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Populate cells based on key cell

Sorry, the first formula should be:

=IF(OR(A2="",A2SheetX!B$2),"",COUNTIF(A$2:A2,"<=" &SheetX!B$2))

as you want the values that are less than or equal to B2 in SheetX (my
earlier formula gives you greater than or equal to).

Hope this helps.

Pete

On Sep 8, 4:16*pm, Pete_UK wrote:
In SheetY cell C1 enter the header "seq", and put this formula in C2:

=IF(OR(A2="",A2<SheetX!B$2),"",COUNTIF(A$2:A2,"=" &SheetX!B$2))

Copy this down as far as you need to (even beyond the data in columns
A and B if they are likely to grow).

Then put this formula in A4 of SheetX:

=IF(ISNA(MATCH(ROW(A1),SheetY!C:C,0)),"",INDEX(She etY!B:B,MATCH(ROW
(A1),SheetY!C:C,0)))

and copy this down as far as you think you will need it.

Hope this helps.

Pete

On Sep 8, 3:52*pm, Banshee wrote:



I have two sheets, X and Y set up as follows:


Y:
A1:B1 contain column headers
A2:A10 contain levels, 1 through 5 in random order
B2:B10 contain strings


Example:
Level String
1 Test1
4 Test2
3 Test3
2 Test4
1 Test5
2 Test6
5 Test7
3 Test8
1 Test9


X:
B2 contains a number, 1 through 5.


Example: 2


I need to populate X A4:A* with all entries Y B2:B10 where Y A2:A10 <= B2


Desired output would be:
Test1
Test4
Test5
Test6
Test9


I'm sorry if this is confusing, and I appreciate any help you can offer..


Thanks!- Hide quoted text -


- Show quoted text -


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Populate cells based on key cell

Thank you to both NBVC and Pete_UK.

Both solutions solved my problem. :)

"Banshee" wrote:

I have two sheets, X and Y set up as follows:

Y:
A1:B1 contain column headers
A2:A10 contain levels, 1 through 5 in random order
B2:B10 contain strings

Example:
Level String
1 Test1
4 Test2
3 Test3
2 Test4
1 Test5
2 Test6
5 Test7
3 Test8
1 Test9

X:
B2 contains a number, 1 through 5.

Example: 2

I need to populate X A4:A* with all entries Y B2:B10 where Y A2:A10 <= B2

Desired output would be:
Test1
Test4
Test5
Test6
Test9

I'm sorry if this is confusing, and I appreciate any help you can offer.

Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Populate cells based on key cell

You're welcome - thanks for feeding back.

Pete

On Sep 8, 4:44*pm, Banshee wrote:
Thank you to both NBVC and Pete_UK.

Both solutions solved my problem. :)



"Banshee" wrote:
I have two sheets, X and Y set up as follows:


Y:
A1:B1 contain column headers
A2:A10 contain levels, 1 through 5 in random order
B2:B10 contain strings


Example:
Level String
1 Test1
4 Test2
3 Test3
2 Test4
1 Test5
2 Test6
5 Test7
3 Test8
1 Test9


X:
B2 contains a number, 1 through 5.


Example: 2


I need to populate X A4:A* with all entries Y B2:B10 where Y A2:A10 <= B2


Desired output would be:
Test1
Test4
Test5
Test6
Test9


I'm sorry if this is confusing, and I appreciate any help you can offer..


Thanks!- Hide quoted text -


- Show quoted text -


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 many cells based on one cell Banshee Excel Discussion (Misc queries) 4 August 5th 09 12:22 AM
Automatically populate cells based on info in another worksheet Francis Excel Worksheet Functions 2 June 10th 08 08:17 PM
Populate column based on data in other cells JR Excel Discussion (Misc queries) 2 September 4th 07 05:38 PM
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 12:41 AM.

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

About Us

"It's about Microsoft Excel"