Hi
I am using this macro to update two rows on another sheet by finding the matching cell.
Is there a way to update wks will all the matches found in column A on wks2?
Kind regards
Alwina
I am using this macro to update two rows on another sheet by finding the matching cell.
Code:
Sub findcode1()
Dim wks As Worksheet
Dim wks2 As Worksheet
Dim myR As Range
Set wks = Worksheets("Voorraad")
Set wks2 = Worksheets("Koop")
If Application.WorksheetFunction.CountIf(wks.Range("A:A"), wks2.Range("a6")) > 0 Then
ask = wks.Range("A:A").Find(wks2.Range("a6"), wks.Range("A1")).Row
wks.Range("c" & ask).Value = wks2.Range("g6").Value
' wks.Range("O" & ask).Value = wks2.Range("C11").Value
'End If
If Application.WorksheetFunction.CountIf(wks.Range("A:A"), wks2.Range("a7")) > 0 Then
ask = wks.Range("A:A").Find(wks2.Range("a7"), wks.Range("A1")).Row
wks.Range("c" & ask).Value = wks2.Range("g7").Value
' wks.Range("O" & ask).Value = wks2.Range("C11").Value
End If
End If
End sub
Is there a way to update wks will all the matches found in column A on wks2?
Kind regards
Alwina
Last edited: