Below is referring to the attachment
Referring to your code,
For Each r In Range("K4", Range("K" & Rows.Count).End(xlUp))
.
I keep the front part
For Each r In Range("K4")
and deleted the back part
, Range("K" & Rows.Count).End(xlUp)
. But the code has to change every time new data is insert, K4 to K5 and so on.
Need something like
For Each r In = Range("K3").value2
which doesn't work.
refers to cell K3 in the Excel. Cell K3 is formulated so the code work on the last data I key in.
For the attachment, I have change K4 to K10 for testing.
Bookmarks