Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 53
Default Vlookup with a difference

Hi,

I am comfortable with standard vlookups but I have a situation that I think
vlookup can help with but I want a different answer brought back.

An my first sheet I have a list of codes that I know exist on the second
sheet, the problem is that there may be duplicates on the second sheet with
different information.

What I would like is if the code exists more than once I would like it to
flag this for me, if it does only exist once then show me the information in
specified column.

I hope I have explained this well enough but just let me know if you need
more info.

Thanks
--
Leanne M (Aussie)
(Changed Display name from Leanne)
United Kingdom
(Don''t ask me what an Aussie is doing living in the UK!)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Vlookup with a difference

Leanne,

A bit long winded but try this

=IF(ROWS(B$1:B1)<=COUNTIF(Sheet2!$A$1:$A$20,$C$1), INDEX(Sheet2!$B$1:$B$20,SMALL(IF(Sheet2!$A$1:$A$20 =$C$1,ROW(Sheet2!$A$1:$A$20)-ROW($C$1)+1),ROWS(B$1:B1))),"")

This array entered (Ctrl+Shift+Enter)

It uses the value in C1 and looks this up in Column A of sheet 2 and if a
match is found returns Column B.

If you drag the formula down it will return the second and subsequent
matches. When no more matches are found it returns a null.

Mike

"Leanne M (Aussie)" wrote:

Hi,

I am comfortable with standard vlookups but I have a situation that I think
vlookup can help with but I want a different answer brought back.

An my first sheet I have a list of codes that I know exist on the second
sheet, the problem is that there may be duplicates on the second sheet with
different information.

What I would like is if the code exists more than once I would like it to
flag this for me, if it does only exist once then show me the information in
specified column.

I hope I have explained this well enough but just let me know if you need
more info.

Thanks
--
Leanne M (Aussie)
(Changed Display name from Leanne)
United Kingdom
(Don''t ask me what an Aussie is doing living in the UK!)

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
What is the difference between VLookup and HLookup tables plc Excel Discussion (Misc queries) 4 April 21st 23 05:15 PM
Vlookup -Difference between 2 versions Ed Excel Worksheet Functions 1 January 13th 08 04:41 PM
subtract the time difference from another time difference Dannigirl Excel Discussion (Misc queries) 3 September 30th 07 03:47 PM
charting a difference of 2 columns' w/o adding a difference column Wab Charts and Charting in Excel 4 July 27th 05 02:37 AM
Difference Miranda Excel Worksheet Functions 2 November 17th 04 04:00 PM


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