Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Finding duplicate value in another workbook

Hello,

I have two spreadsheets that have some matching values. Fo
example: RE518602. One big spreadsheet has all of the availabl
numbers and there are many small sheets that have some numbers in them
I need to write a macro that will look at all numbers in a small shee
and find the matching number in the main (big) sheet. After I matc
them I need to extract a different value that is in the same row bu
different column (on the big sheet) and paste it in a column in th
small sheet. (All sheets are in separate workbooks.)

If someone can help me with this problem it would be greatl
appreciated.

Thank you
Morr

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Finding duplicate value in another workbook

You don't need a macro.

Assume the matching column is in column A on both sheets

in B2 (for example) of the smallsheet, put in the formula

=vlookup(A2,'[Bigsheet.xls]Sheet1!$A$1:$D$500,3,False)

this retrieves the value form column C in the Bigsheet for a match.

It returns #N/A if not found.

You can then drag fill it down the column.

--
Regards,
Tom Ogilvy

"morry " wrote in message
...
Hello,

I have two spreadsheets that have some matching values. For
example: RE518602. One big spreadsheet has all of the available
numbers and there are many small sheets that have some numbers in them.
I need to write a macro that will look at all numbers in a small sheet
and find the matching number in the main (big) sheet. After I match
them I need to extract a different value that is in the same row but
different column (on the big sheet) and paste it in a column in the
small sheet. (All sheets are in separate workbooks.)

If someone can help me with this problem it would be greatly
appreciated.

Thank you
Morry


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Finding duplicate value in another workbook

Ok, I tried to use this but it doesn't like my file name.
Here is what you gave me:

=vlookup(A2,'[Bigsheet.xls]Sheet1!$A$1:$D$500,3,False)

My file name is: All parts(test).xls
The sheet name is: All parts
My locations a
The value in: Column B of the sheet that i am adding the vlooku
to
needs to match with the value in: All parts(test).xls: column A
then i need the value from: column C in All parts(test).xls (which i
on the same row as the match) to paste in column C of the sheet that
am putting this vlookup in.

Here are some ways I tried:
=vlookup(B2,'[All parts(test).xls]All parts!$A$1:$C$5000,3,False)
=vlookup(B2,[All parts(test).xls]Sheet1!$A$1:$C$5000,3,False)
=vlookup(B2,All parts(test).xlsAll parts!$A$1:$C$5000,3,False)

What am I doing wrong?

Thank you
Morr

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Finding duplicate value in another workbook

=vlookup(B2,'[All parts(test).xls]All parts'!$A$1:$C$5000,3,False)

I left out the right single quote after the sheet name.

This assumes the all parts(test).xls workbook is open.

An easy way to build such a reference is to go to the formula bar,

=Vlookup(B2,
now go to window, select your workbook name, click on sheet All parts, then
highlight your range and enter a comma, type 3,False) and Enter

--
Regards,
Tom Ogilvy


morry wrote in message
...
Ok, I tried to use this but it doesn't like my file name.
Here is what you gave me:

=vlookup(A2,'[Bigsheet.xls]Sheet1!$A$1:$D$500,3,False)

My file name is: All parts(test).xls
The sheet name is: All parts
My locations a
The value in: Column B of the sheet that i am adding the vlookup
to
needs to match with the value in: All parts(test).xls: column A
then i need the value from: column C in All parts(test).xls (which is
on the same row as the match) to paste in column C of the sheet that i
am putting this vlookup in.

Here are some ways I tried:
=vlookup(B2,'[All parts(test).xls]All parts!$A$1:$C$5000,3,False)
=vlookup(B2,[All parts(test).xls]Sheet1!$A$1:$C$5000,3,False)
=vlookup(B2,All parts(test).xlsAll parts!$A$1:$C$5000,3,False)

What am I doing wrong?

Thank you
Morry


---
Message posted from http://www.ExcelForum.com/



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Finding duplicate value in another workbook

The code you gave me worked thank yo

--
Message posted from http://www.ExcelForum.com

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
Finding duplicate postcodes Grolly Excel Discussion (Misc queries) 2 August 10th 09 11:56 AM
Finding duplicate value Ayo Excel Discussion (Misc queries) 2 October 27th 08 07:49 PM
finding duplicate addresses diamonds Excel Worksheet Functions 2 June 21st 06 11:40 PM
Finding Duplicate customers nander Excel Discussion (Misc queries) 3 April 17th 06 05:32 PM
Finding a Duplicate using Vb Rocky McKinley Excel Programming 1 August 26th 03 09:29 PM


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