apparently, the first two lines in my post are just an explanation of building a range with a variable and are not a part of a macro.

you should use the line Range("H7:H" & LastRow1) to correct the ranges in your code.

if you are willing to go any further, start your own thread or ask a moderator to split this thread into two and post your workbook.