Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 59
Default Lookup second/third values

I have a list of items in column a. Every time a value occurs I need
to return the value in column B to my sublist in another sheet. Here
is what I'm talking about - my list would look like this
A B
1 High
2 low
3 Right
1 Left
5 New
1 Old
1 Young
2 Ancient
3 Used

Lets say I wanted to display all items from column B where column A =
1. If I use a vlookup, of course it just returns the first value
(High) but I need my list on the other sheet to look like this:

High
Left
Old
Young

I hope this makes sense - does anyone have any ideas? I can't just use
a filter because I need this list to be on another sheet separate from
the data.

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 4
Default Lookup second/third values

On Aug 22, 4:49 pm, Bongard wrote:
I have a list of items in column a. Every time a value occurs I need
to return the value in column B to my sublist in another sheet. Here
is what I'm talking about - my list would look like this
A B
1 High
2 low
3 Right
1 Left
5 New
1 Old
1 Young
2 Ancient
3 Used

Lets say I wanted to display all items from column B where column A =
1. If I use a vlookup, of course it just returns the first value
(High) but I need my list on the other sheet to look like this:

High
Left
Old
Young

I hope this makes sense - does anyone have any ideas? I can't just use
a filter because I need this list to be on another sheet separate from
the data.

Thanks!


suppose the dat is from A1 and B1 dwaon.
in C1 type 1
and in D1 type or copy this formula
=IF(COUNTIF($A$1:$A$1000,$C$1)=ROWS($1:1),INDEX($ B$1:$B
$1000,SMALL(IF($A$1:$A$1000=$C$1,ROW($1:$1000)),RO W(1:1))),"")
copy D1 to D2,D3 etc till you get a blank.
note that reference number (1) is in c1 that is why $C$! in two
places in the formula. this is to help you modify the formula.

(the formula was devised by Frank Kable)

  #3   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 4
Default Lookup second/third values

On Aug 22, 5:03 pm, venkat1926 wrote:
On Aug 22, 4:49 pm, Bongard wrote:



I have a list of items in column a. Every time a value occurs I need
to return the value in column B to my sublist in another sheet. Here
is what I'm talking about - my list would look like this
A B
1 High
2 low
3 Right
1 Left
5 New
1 Old
1 Young
2 Ancient
3 Used


Lets say I wanted to display all items from column B where column A =
1. If I use a vlookup, of course it just returns the first value
(High) but I need my list on the other sheet to look like this:


High
Left
Old
Young


I hope this makes sense - does anyone have any ideas? I can't just use
a filter because I need this list to be on another sheet separate from
the data.


Thanks!


suppose the dat is from A1 and B1 dwaon.
in C1 type 1
and in D1 type or copy this formula
=IF(COUNTIF($A$1:$A$1000,$C$1)=ROWS($1:1),INDEX($ B$1:$B
$1000,SMALL(IF($A$1:$A$1000=$C$1,ROW($1:$1000)),RO W(1:1))),"")
copy D1 to D2,D3 etc till you get a blank.
note that reference number (1) is in c1 that is why $C$! in two
places in the formula. this is to help you modify the formula.

(the formula was devised by Frank Kable)


sorry forgot to tell you that the formula should be fired by
control+shift+enter

  #4   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 698
Default Lookup second/third values

With your posted data in A1:B9

Try this:
D1: (the Col_A item to match)

Put this ARRAY FORMULA (committed with Ctrl+Shift+Enter, instead fo just
Enter) in
E1:
=IF(ROW()COUNTIF($A$1:$A$10,$D$1),"",INDEX($B$1:$ B$10,SMALL(IF($A$1:$A$10=$D$1,ROW($A$1:$A$10)),ROW ())))

Copy E1 and paste into E2 and down as far as you need.

Adjust range references to suit your situation.

Is that something you can work with?
(Post back if you have more questions)
***********
Regards,
Ron

XL2003, WinXP


"Bongard" wrote:

I have a list of items in column a. Every time a value occurs I need
to return the value in column B to my sublist in another sheet. Here
is what I'm talking about - my list would look like this
A B
1 High
2 low
3 Right
1 Left
5 New
1 Old
1 Young
2 Ancient
3 Used

Lets say I wanted to display all items from column B where column A =
1. If I use a vlookup, of course it just returns the first value
(High) but I need my list on the other sheet to look like this:

High
Left
Old
Young

I hope this makes sense - does anyone have any ideas? I can't just use
a filter because I need this list to be on another sheet separate from
the data.

Thanks!


  #5   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 1,231
Default Lookup second/third values

"Ron Coderre" wrote...
With your posted data in A1:B9

Try this:
D1: (the Col_A item to match)

Put this ARRAY FORMULA (committed with Ctrl+Shift+Enter, instead fo just
Enter) in
E1:
=IF(ROW()COUNTIF($A$1:$A$10,$D$1),"",INDEX($B$1: $B$10,
SMALL(IF($A$1:$A$10=$D$1,ROW($A$1:$A$10)),ROW())) )

....
Adjust range references to suit your situation.

....

Not the ideal formula. ROW() as such will return the row of the cell
containing the formula containing the ROW() call. If the OP entered this
formula in E11 and below, it'd always return "". Always better to be more
specific with rows so formulas would work no matter where they're placed.

=IF(ROWS(E$1:E1)COUNTIF($A$1:$A$10,$D$1),"",INDEX ($B$1:$B$10,
SMALL(IF($A$1:$A$10=$D$1,ROW($A$1:$A$10)-MIN(ROW($A$1:$A$10))+1),
ROWS(E$1:E1))))

or

=IF(ROWS(E$1:E1)COUNTIF($A$1:$A$10,$D$1),"",INDEX ($B:$B,
SMALL(IF($A$1:$A$10=$D$1,ROW($A$1:$A$10)),ROWS(E$1 :E1))))

Former, though longer, is better because it limits its references to the
ranges containing data.




  #6   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 698
Default Lookup second/third values

ROWS(E$1:E1) instead of ROW()

Excellent suggestion, Harlan...thanks

***********
Best Regards,
Ron

XL2003, WinXP


"Harlan Grove" wrote:

"Ron Coderre" wrote...
With your posted data in A1:B9

Try this:
D1: (the Col_A item to match)

Put this ARRAY FORMULA (committed with Ctrl+Shift+Enter, instead fo just
Enter) in
E1:
=IF(ROW()COUNTIF($A$1:$A$10,$D$1),"",INDEX($B$1: $B$10,
SMALL(IF($A$1:$A$10=$D$1,ROW($A$1:$A$10)),ROW())) )

....
Adjust range references to suit your situation.

....

Not the ideal formula. ROW() as such will return the row of the cell
containing the formula containing the ROW() call. If the OP entered this
formula in E11 and below, it'd always return "". Always better to be more
specific with rows so formulas would work no matter where they're placed.

=IF(ROWS(E$1:E1)COUNTIF($A$1:$A$10,$D$1),"",INDEX ($B$1:$B$10,
SMALL(IF($A$1:$A$10=$D$1,ROW($A$1:$A$10)-MIN(ROW($A$1:$A$10))+1),
ROWS(E$1:E1))))

or

=IF(ROWS(E$1:E1)COUNTIF($A$1:$A$10,$D$1),"",INDEX ($B:$B,
SMALL(IF($A$1:$A$10=$D$1,ROW($A$1:$A$10)),ROWS(E$1 :E1))))

Former, though longer, is better because it limits its references to the
ranges containing data.



  #8   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 59
Default Lookup second/third values

Don, sorry about posting to multiple groups, I was under the
impression that I was supposed to list the newsgroups rather than
going to each group individually to post like this. Also, if you look
at my post, I stated that I need the data on another sheet so
autofilter is not an option.

I did use Ron's code and it worked beautifully. I had to make a few
minor tweaks to get it to return the small() instance that I was
looking for but it helped me to learn what was going on.


Thanks for your help guys!

  #9   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 3,268
Default Lookup second/third values

Actually you did it correctly, it's multiposting (for instance post the same
question on 5 occasions in 5 different groups) that is frowned upon since
you can't see if someone else already answered the post in another
newsgroup. And if it is a complicated question it's not that fun to spend a
considerable time helping someone only to find out that he/she already
received an answer. While crossposting (posting once to multiple groups)
might skew search engines a bit at least I can see if you got an answer
already and wouldn't waste any time on it.
So if you feel the need to do this, keep on doing it this way.


--
Regards,

Peo Sjoblom




"Bongard" wrote in message
oups.com...
Don, sorry about posting to multiple groups, I was under the
impression that I was supposed to list the newsgroups rather than
going to each group individually to post like this. Also, if you look
at my post, I stated that I need the data on another sheet so
autofilter is not an option.

I did use Ron's code and it worked beautifully. I had to make a few
minor tweaks to get it to return the small() instance that I was
looking for but it helped me to learn what was going on.


Thanks for your help guys!



  #10   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 1,231
Default Lookup second/third values

"Don Guillett" wrote...
NO need to post in more than one group. Have you tried
datafilterautofilter

....

YEs, but crossposting is acceptable, which is what the OP did.




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
i wish to lookup values in column A, & add adjacent values in colu Browny Excel Discussion (Misc queries) 4 September 26th 08 05:00 PM
Lookup with two lookup values KimC Excel Discussion (Misc queries) 1 September 1st 08 04:05 AM
How do I use LOOKUP to return a range of values, then SUM values? irvine79 Excel Worksheet Functions 5 August 4th 06 01:33 PM
Advanced Lookup (lookup for 2 values) 0-0 Wai Wai ^-^ Excel Worksheet Functions 2 March 30th 06 07:09 PM
How do I lookup and return different values when the lookup value. kg Excel Discussion (Misc queries) 1 January 20th 05 12:53 AM


All times are GMT +1. The time now is 12:10 PM.

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"