Hi Everyone,
I hope to get a reply soon this is my first time on here although I have been here for a while, sorry.
My goal is to find a column header name "Current" which could be ANYWHERE in a worksheet (worksheet name-- >"00-1820080") and paste it to another sheet (worksheet name ---> "Upload") on column I.
I have the following formulas but they failed to solve my problem, they keep posting Column I from (worksheet name-- >"00-1820080") to Column I on (worksheet name ---> "Upload") ... I don't want that:
'Look for "Current" copy and then Paste on Upload
Dim i As Integer, j As Integer, LR As Long
With Sheets("00-1820080")
For i = 1 To 12
If .Cells(1, i).Value Like "Current" Then
LR = .Cells(Rows.Count, i).End(xlUp).Row
j = j + 9
.Range(.Cells(2, i), .Cells(LR, i)).Copy Destination:=Sheets("Upload").Cells(2, j)
End If
Next i
End With
AND I have tried this following formula as well .. bother don't work .. first one was working fine for a while and not it doesn't work :S
Dim s1 As Worksheet, s2 As Worksheet
Set s1 = Sheets("00-1820080")
Set s2 = Sheets("Upload")
s1.Activate
Range("A1").Select
s1.Rows("1:1").Find(What:="Current", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
c = ActiveCell.Column
s1.Columns(c).Copy s2.Range("I1")
End Sub
Bookmarks