I want to add text to Column C Sheet 2 with "OK", IF there is a value in Column C Sheet 1.
Here is an example of the data on Sheet 1:
| NIP | Name | Graduated |
|---|---|---|
| 8593 | Ariana | 04/12/2023 |
| 8594 | Mike | |
| 8595 | Harry | 08/20/2023 |
Data on Sheet 2:
| NIP | Name | Recommendation |
|---|---|---|
| 8593 | Ariana | |
| 8595 | Harry | |
| 8596 | John |
There should be an index match function to column A on both sheets, because the sheets don't contain the same lists. And I wish to make it dynamic range.
Here is my current code but it gave runtime type mismatch
Dim lw As Long
lw = sws.Cells(sws.Rows.Count, "A").End(xlUp).Row
Dim p As Long
p = sws.Range("C" & Rows.Count).End(xlDown).Rows
Dim u As Long
For u = 2 To lw
If p <> 0 Then
dws.Cells(i, "C").Value = "OK"
End If
Next u
Try this:
Base sheet is Sheet1 Recom sheet is Sheet2