here is my code and i am stuck...
The comment under the if statement is telling me what to do if the conditions are met
Sub PopulateClientDate()
Dim MyCell As Range
Dim ws1 As Worksheet, ws2 As Worksheet
ws1 = Sheets("Client")
ws2 = Sheets("Collections")
MyCell.Value = ws1.Range("B6").Value 'Value of cell B6 in Client Sheet which contains name of client
'"A10:A218" - Date column in ws1
'"D8:WC8" - Name of clients in row on ws2
'"B10:B218" - Date column in ws2
If Trim(MyCell.Value) <> "" Then ' Checks if cell is not empty
If MyCell.Value = ws2.Range("D8:WC8") Then
If ws1.Range("A10:A218").Value = ws2.Range("B10:B218").valu Then
'ws2.range(*).value should copy the value of the overlaping cell in ws2 (between row D8:WC8 and column B10:B218)
'to ws1 on colum B10:B218 where date on colum of ws1 is same as date on colum of ws2
End If
End Sub
Bookmarks