espenskeie
Well-known Member
- Joined
- Mar 30, 2009
- Messages
- 636
- Office Version
-
- 2016
- Platform
-
- Windows
Hello
I have column A in Workbook wbPort where I have listed all dates since 01.01.2005 until 2014
In workbook wb I have a column R where some of the cells has a value, and in column A I have the dates.
I would like to find the cell where there's a value (Column R), then take that date (Column A) and find the matching date in wbPort and paste the value in column X at the same row as date.
I've tried this code, but I'm not sure if this is any good way to solve it.
Kind regards
Espen
I have column A in Workbook wbPort where I have listed all dates since 01.01.2005 until 2014
In workbook wb I have a column R where some of the cells has a value, and in column A I have the dates.
I would like to find the cell where there's a value (Column R), then take that date (Column A) and find the matching date in wbPort and paste the value in column X at the same row as date.
I've tried this code, but I'm not sure if this is any good way to solve it.
Code:
For Each c In rng
If Abs(c.Value) < 0.01 Then
rowVal = c.Value.Row
finddate = ws1.Range("A" & rowVal).Value
Res = Application.Match(CLng(finddate), ws1.Range("A2:A3482"), 0)
c.Value.Copy Destination:wsPort.Cells(Res + 1, X)
End If
Next
Kind regards
Espen