Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 170
Default Search and copy macro

I am having two exel files. I need a macro that looks at the number in file1
cell B2, searches that number in file2 column B and copies a number in that
row (Mx) to cell C2 in file1. It has to do that for the whole column B in
file1.

I found some simmilar tutorials, like this one:
http://cpearson.com/excel/duplicat.htm

but I can't figure out how to do exactlly what I need.

Any help would be great!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Search and copy macro

in C2

=if(C2<"",Vlookup($B2,[File2.xls]Sheet1!$A$1:$F$200,3,False),"")

drag fill down the column.

See Excel help on the vlookup formula.

--
Regards,
Tom Ogilvy



"Frank" wrote in message
...
I am having two exel files. I need a macro that looks at the number in

file1
cell B2, searches that number in file2 column B and copies a number in

that
row (Mx) to cell C2 in file1. It has to do that for the whole column B in
file1.

I found some simmilar tutorials, like this one:
http://cpearson.com/excel/duplicat.htm

but I can't figure out how to do exactlly what I need.

Any help would be great!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 170
Default Search and copy macro

Thank you! I didn't know about the vlookup and hlookup commands.
It works now exactly as i wanted it!

"Tom Ogilvy" je napisal:

in C2

=if(C2<"",Vlookup($B2,[File2.xls]Sheet1!$A$1:$F$200,3,False),"")

drag fill down the column.

See Excel help on the vlookup formula.

--
Regards,
Tom Ogilvy



"Frank" wrote in message
...
I am having two exel files. I need a macro that looks at the number in

file1
cell B2, searches that number in file2 column B and copies a number in

that
row (Mx) to cell C2 in file1. It has to do that for the whole column B in
file1.

I found some simmilar tutorials, like this one:
http://cpearson.com/excel/duplicat.htm

but I can't figure out how to do exactlly what I need.

Any help would be great!




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
Macro to Search and Copy davidnagel Excel Discussion (Misc queries) 4 July 29th 08 10:13 AM
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM
Macro to search, compare, copy and delete mark_l_88 Excel Programming 2 April 24th 04 09:08 PM
search/copy/paste macro M Excel Programming 1 December 29th 03 07:26 PM
Search/copy/paste Macro mjwillyone Excel Programming 2 December 27th 03 07:49 AM


All times are GMT +1. The time now is 11:07 AM.

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

About Us

"It's about Microsoft Excel"