ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find functions (https://www.excelbanter.com/excel-programming/271184-re-find-functions.html)

Pierre Archambault

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!





All times are GMT +1. The time now is 11:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com