Hey everyone,
I'm having a little trouble. I was able to select one group that I wanted to delete based on the column number because I am using a variable:
testint is just the number of columns in the sheet
But I want to select another range at the same time so the testint variable would still be valid:
I tried using union in the code below but I got an error.
Is there another way to do this? Thanks for the help.
I'm having a little trouble. I was able to select one group that I wanted to delete based on the column number because I am using a variable:
Code:
Range(Columns(10), Columns(testint - 10)).Select
Selection.Delete Shift:=xlToLeft
But I want to select another range at the same time so the testint variable would still be valid:
Code:
Range(Columns((testint - 4), Columns(testint)).Select
Code:
Union(Range(Columns(10), Columns(testint - 10)), Range(Columns((testint - 4), Columns(testint)))).Select
Selection.Delete Shift:=xlToLeft
Is there another way to do this? Thanks for the help.
Last edited: