ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy row marco (https://www.excelbanter.com/excel-programming/292584-copy-row-marco.html)

mschulze123

Copy row marco
 
Hi,

In the following code I am trying to search one field in sheet2 with
value in sheet1

I can find the value and with/end set the font color to show me I foun
the value, but then I want to copy the roll that the item is in to
3rd sheet.

so the process is sheet 1 take value and search sheet2 for match the
copy matching and paste in sheet 3.

I cannot find what I need for copying and pasting a row.

Can anyone help?
Thanks
_____________________________________________
Sub upcLookup()
'
' upcLookup Macro
' Macro recorded 2/18/2004 by rbergesk
'
' Keyboard Shortcut: Ctrl+u
'
Dim intRowS As Integer, intRowT As Integer
Dim bText As String, bNumber As Integer
Dim strTab As String
intRowS = 1
Do Until IsEmpty(Worksheets(1).Cells(intRowS, 1))


Sheets("masterList").Select
Cells.Find(What:=Worksheets(1).Cells(intRowS, 1),
After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, _
MatchCase:=False).Activate

With ActiveCell.Font
.Bold = True
.Italic = True
.Color = RGB(244, 12, 51)
End With
'????Rows(intRowS).Cop
Worksheets("masterList").Rows(ActiveCell.Row)
intRowS = intRowS + 1

Loop
End Su

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 06:58 AM.

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