View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Pierre Archambault Pierre Archambault is offline
external usenet poster
 
Posts: 35
Default Find functions

Try using a worksheet function to retrieve the data based on a key.

DestinationRange.Value = WorksheetFunction.DGet(Range("YourDataRange"),
"KeyColumnName", Range("CriteriaRange"))

YourDataRange must include the headers row.
KeyColumnName is the header of the column wich corresponds to the value in
CriteriaRange

Pierre

------------------------------------

"Jonas O" a écrit dans le message de
...

Hi,
I would like to compie a macro which find a searchstring (e.g. value or
text) from one workbook and uses this searchstring to find it in another
workbook (=small database). When finding the desired searchstring, the
macro should select and copy values from the database and paste it into
the first workbook. Is it possible to make such a macro and does anyone
has some guidelines how to do?

Kind regards
Jonas


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!