I have some sample data below and I want to write a code that will delete anything in a specific range of columns if it has a specific parameter in the AC column.
For example, if "REMOVE" is in AC2 and AC3, I want to delete cells V2:AC3 and shift the remaining data up. The amount of rows will vary, but the "REMOVE" tag will always be at the most top rows of the spreadsheet. This particular report spans 52 tabs at this time so I will loop through all worksheets.
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]S[/TD]
[TD]T[/TD]
[TD]U[/TD]
[TD]V[/TD]
[TD]W[/TD]
[TD]X[/TD]
[TD]Y[/TD]
[TD]Z[/TD]
[TD]AA[/TD]
[TD]AB[/TD]
[TD]AC[/TD]
[TD]AD[/TD]
[TD]AE[/TD]
[TD]AF[/TD]
[TD]AG[/TD]
[TD]AH[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]State[/TD]
[TD]TIN[/TD]
[TD]BC[/TD]
[TD]Allwd[/TD]
[TD]Cntr[/TD]
[TD]Dbblr[/TD]
[TD]Activity[/TD]
[TD]Bad TINS[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]MS[/TD]
[TD]5546868[/TD]
[TD]23[/TD]
[TD]400[/TD]
[TD]Matt[/TD]
[TD]Declined[/TD]
[TD]6/1/18[/TD]
[TD]REMOVE[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]TN[/TD]
[TD]4654654[/TD]
[TD]58[/TD]
[TD]4654[/TD]
[TD]James[/TD]
[TD]Successful[/TD]
[TD]8/2/18[/TD]
[TD]REMOVE[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CA[/TD]
[TD]8978793[/TD]
[TD]100[/TD]
[TD]873[/TD]
[TD]Bob[/TD]
[TD]Successful[/TD]
[TD]7/15/18[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]FL[/TD]
[TD]7352421[/TD]
[TD]586[/TD]
[TD]7352[/TD]
[TD]Emily[/TD]
[TD]None[/TD]
[TD]8/7/18[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]TN[/TD]
[TD]5646451[/TD]
[TD]987[/TD]
[TD]3215[/TD]
[TD]Sue[/TD]
[TD]Initial[/TD]
[TD]2/8/17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
For example, if "REMOVE" is in AC2 and AC3, I want to delete cells V2:AC3 and shift the remaining data up. The amount of rows will vary, but the "REMOVE" tag will always be at the most top rows of the spreadsheet. This particular report spans 52 tabs at this time so I will loop through all worksheets.
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]S[/TD]
[TD]T[/TD]
[TD]U[/TD]
[TD]V[/TD]
[TD]W[/TD]
[TD]X[/TD]
[TD]Y[/TD]
[TD]Z[/TD]
[TD]AA[/TD]
[TD]AB[/TD]
[TD]AC[/TD]
[TD]AD[/TD]
[TD]AE[/TD]
[TD]AF[/TD]
[TD]AG[/TD]
[TD]AH[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]State[/TD]
[TD]TIN[/TD]
[TD]BC[/TD]
[TD]Allwd[/TD]
[TD]Cntr[/TD]
[TD]Dbblr[/TD]
[TD]Activity[/TD]
[TD]Bad TINS[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]MS[/TD]
[TD]5546868[/TD]
[TD]23[/TD]
[TD]400[/TD]
[TD]Matt[/TD]
[TD]Declined[/TD]
[TD]6/1/18[/TD]
[TD]REMOVE[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]TN[/TD]
[TD]4654654[/TD]
[TD]58[/TD]
[TD]4654[/TD]
[TD]James[/TD]
[TD]Successful[/TD]
[TD]8/2/18[/TD]
[TD]REMOVE[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CA[/TD]
[TD]8978793[/TD]
[TD]100[/TD]
[TD]873[/TD]
[TD]Bob[/TD]
[TD]Successful[/TD]
[TD]7/15/18[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]FL[/TD]
[TD]7352421[/TD]
[TD]586[/TD]
[TD]7352[/TD]
[TD]Emily[/TD]
[TD]None[/TD]
[TD]8/7/18[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]TN[/TD]
[TD]5646451[/TD]
[TD]987[/TD]
[TD]3215[/TD]
[TD]Sue[/TD]
[TD]Initial[/TD]
[TD]2/8/17[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]