#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Lookup Formula

I have created a Vlookup formula that looks in cell A1 (account #) on Tab A
and then goes to Tab B to find that account #. Tab B will have about 3000
lines of data and could include that account # as many as 30 times. When it
finds each line with that account number I need it listed on Tab A. I can
get it to copy the first time it finds that account # but how can I get it to
list all the others on lines 2-31? Is there a way that all 30 lines can be
listed on Tab A? Thanks

--
Kaye
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,420
Default Lookup Formula

=IF(ISERROR(SMALL(IF(Sheet2!$A$1:$A$20=$A$1,ROW($A $1:$A$20),""),ROW($A1))),"",
INDEX(Sheet2!$B$1:$B$20,SMALL(IF(Sheet2!$A$1:$A$20 =$A$1,ROW($A$1:$A$20),""),ROW($A1))))

This is an array formula, so commit with Ctrl-Shift-Enter, not just Enter.

Copy the formula down as far as you need.

--
__________________________________
HTH

Bob

"Kaye" wrote in message
...
I have created a Vlookup formula that looks in cell A1 (account #) on Tab A
and then goes to Tab B to find that account #. Tab B will have about 3000
lines of data and could include that account # as many as 30 times. When
it
finds each line with that account number I need it listed on Tab A. I can
get it to copy the first time it finds that account # but how can I get it
to
list all the others on lines 2-31? Is there a way that all 30 lines can
be
listed on Tab A? Thanks

--
Kaye



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 320
Default Lookup Formula

One way: Suppose you're looking for account # in cell A1 (of Tab A). Enter
this formula in cell B2 (B1 must be empty):
=MATCH($A$1,OFFSET(Sheet2!$A$1,B1,0,1000,1),0)+B1 and fill down. When there
are no more, you'll see #N/A. If that's OK, you're done. If you don't want to
see the #N/A's then select all of col B, use Format/Conditional Formatting,
change "cell Value Is" to "Formula Is", enter =ISNA(B1), then click Format,
select the Font tab, choose a white font.

HTH

"Kaye" wrote:

I have created a Vlookup formula that looks in cell A1 (account #) on Tab A
and then goes to Tab B to find that account #. Tab B will have about 3000
lines of data and could include that account # as many as 30 times. When it
finds each line with that account number I need it listed on Tab A. I can
get it to copy the first time it finds that account # but how can I get it to
list all the others on lines 2-31? Is there a way that all 30 lines can be
listed on Tab A? Thanks

--
Kaye

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
Formula to Lookup Min value Gavin Excel Discussion (Misc queries) 3 April 18th 08 12:33 PM
if v lookup formula dwalston Excel Worksheet Functions 5 March 24th 08 04:46 AM
Lookup Formula help DavidFarnsworth Excel Worksheet Functions 10 January 22nd 07 05:13 PM
Lookup Formula - but have a formula if it can't find/match a value Stephen Excel Worksheet Functions 11 June 14th 05 05:32 AM
lookup formula help Peter Excel Worksheet Functions 1 February 28th 05 08:49 PM


All times are GMT +1. The time now is 04:24 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"