Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Nigel
 
Posts: n/a
Default Match numbers in range

Hi,
Can anyone tell me if you there is a macro which will carry out the following?
select value of C2 in current workbook , open another workbook ( unless it
is already open, then switch to it) and search a range of A21:A5000. when it
finds a number that matches, it needs to paste data into the cells in the
same row. I.E.

C2 = 2245 ( for example)
( there are other cells to be included but i can get around these)
open other workbook unless it is open already then swith to it,
search the range until C2 value matches the number 2245 in the list,
and copy data into the cells next to it which are columns B,C,E,F,G,H,I.

the workbook to be opened is called QUOTE REGISTER and the sheet in Quote
Register is Year To Date.

i need to transfer all data from hundreds of files to this sheet. If anyone
could help, well i would be so glad :)

Kind Regards,

nigel
  #2   Report Post  
 
Posts: n/a
Default

Hi
Try using VLOOKUP. This will work on closed workbooks too. Have a look at
Help for some more information. The format is something like:
=VLOOKUP(C2,'C:\My Documents\[QUOTE REGISTER]'!A:E,2 FALSE)
This will take the value in C2 and search column A in the QUOTE REGISTER
book for it. When it finds it, it will return the value that is in the cell
that is 2 to the right of it.

--
Andy.


"Nigel" wrote in message
...
Hi,
Can anyone tell me if you there is a macro which will carry out the
following?
select value of C2 in current workbook , open another workbook ( unless it
is already open, then switch to it) and search a range of A21:A5000. when
it
finds a number that matches, it needs to paste data into the cells in the
same row. I.E.

C2 = 2245 ( for example)
( there are other cells to be included but i can get around these)
open other workbook unless it is open already then swith to it,
search the range until C2 value matches the number 2245 in the list,
and copy data into the cells next to it which are columns B,C,E,F,G,H,I.

the workbook to be opened is called QUOTE REGISTER and the sheet in Quote
Register is Year To Date.

i need to transfer all data from hundreds of files to this sheet. If
anyone
could help, well i would be so glad :)

Kind Regards,

nigel



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
Match Function Problem - Won't Find Certain Numbers PE Excel Discussion (Misc queries) 2 May 9th 05 03:53 PM
Match Last Occurrence of two numbers and Return Date Sam via OfficeKB.com Excel Worksheet Functions 6 April 5th 05 12:40 PM
Match Last Occurrence of two numbers and Count to Previous Occurence Sam via OfficeKB.com Excel Worksheet Functions 33 April 4th 05 02:17 PM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM
Use MATCH to find position of max in 2D range? Peter B Excel Worksheet Functions 4 October 28th 04 05:23 PM


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

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"