View Single Post
 
Old 04-24-2021, 10:03 AM
gibra's Avatar
gibra gibra is offline Windows 10 Office 2019
Novice
 
Join Date: Mar 2021
Posts: 8
gibra is on a distinguished road
Default

You must always indicate the sheet you intend to work on.
This instruction, does NOT select the range as you think, because it reads the active sheet which is not TCU but is Sheet1.
Code:
For Each c In Range("F15:F" & Cells(Rows.Count, 6).End(xlUp).Row)
so you should be write:
Code:
For Each c In ws.Range("F15:F" & Cells(ws.Rows.Count, 6).End(xlUp).Row)
and so on...
Reply With Quote