ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   search and copy (https://www.excelbanter.com/excel-programming/310217-search-copy.html)

jjohn

search and copy
 
Without moving the cursor from the active cell, I need a
code that will look across Row 1 in Sheet2 and find the
one value that will match the value in Sheet3!A1. I then
need it to copy that row.

Myrna Larson

search and copy
 
Not sure what you want to copy, but X will contain the *column* number where
the match was found:

X = Application.Match(Worksheets("Sheet3").Range("A1") , _
Worksheets("Sheet2").Rows(1),0)



On Thu, 16 Sep 2004 14:39:01 -0700, "jjohn"
wrote:

Without moving the cursor from the active cell, I need a
code that will look across Row 1 in Sheet2 and find the
one value that will match the value in Sheet3!A1. I then
need it to copy that row.




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

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