Shazam
02-15-2006, 05:51 AM
Hey everyone!
May I have this code be modified to do a criteria? Meaning this code below insert 3 columns can the code start inserting 3 columns starting with the first date in row 2 because the my data changes daily. I put a sample of my workbook below. Please look at the worksheet tab named "results". It would give you a better explanation.
Sub InsertColumns()
For colx = 30 To 5 Step -1
Columns(colx).Insert Shift:=xlToLeft
Columns(colx).Insert Shift:=xlToLeft
Columns(colx).Insert Shift:=xlToLeft
Next
End Sub
May I have this code be modified to do a criteria? Meaning this code below insert 3 columns can the code start inserting 3 columns starting with the first date in row 2 because the my data changes daily. I put a sample of my workbook below. Please look at the worksheet tab named "results". It would give you a better explanation.
Sub InsertColumns()
For colx = 30 To 5 Step -1
Columns(colx).Insert Shift:=xlToLeft
Columns(colx).Insert Shift:=xlToLeft
Columns(colx).Insert Shift:=xlToLeft
Next
End Sub