I need to create a macro that selects two non-sequential columns that have a dynamic row reference.
I.e. The static macro would be like this:
Range("A7:A54,C7:C54").Select
My issue is that the last row is dynamic, so I have added a variable called Height that calculates this (not important how I get this row number, so will not show that code here).
The macro I have tried to implement is therefore:
Range("A7:A" & Height, "C7:C" & Height).Select
Height being 54 in this case.
But when I run the macro it select the column in between as well! I.e. also column B (A7:C54)
Can anyone help me figure out how I can adjust the code to not select the column in between?