I hope this makes some sort of sense:
I have a few lines of code that i need to repeat on all visible sheets of a workbook. The number of sheets and names of sheets will vary on a job by job basis but the cell locations do not change.
Here is what i am trying to repeat:
Sub Copy_Sort()
Range("U10:AF21").Copy
Range("AU10").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("AU10:BF10").Sort Key1:=Range("AU10"), Order1:=xlAscending, Orientation:=xlLeftToRight, DataOption1:=xlSortTextAsNumbers
Range("AU11:BF11").Sort Key1:=Range("AU11"), Order1:=xlAscending, Orientation:=xlLeftToRight, DataOption1:=xlSortTextAsNumbers
Range("AU12:BF12").Sort Key1:=Range("AU12"), Order1:=xlAscending, Orientation:=xlLeftToRight, DataOption1:=xlSortTextAsNumbers
Range("AU13:BF13").Sort Key1:=Range("AU13"), Order1:=xlAscending, Orientation:=xlLeftToRight, DataOption1:=xlSortTextAsNumbers
Range("AU14:BF14").Sort Key1:=Range("AU14"), Order1:=xlAscending, Orientation:=xlLeftToRight, DataOption1:=xlSortTextAsNumbers
Range("AU15:BF15").Sort Key1:=Range("AU15"), Order1:=xlAscending, Orientation:=xlLeftToRight, DataOption1:=xlSortTextAsNumbers
Range("AU16:BF16").Sort Key1:=Range("AU16"), Order1:=xlAscending, Orientation:=xlLeftToRight, DataOption1:=xlSortTextAsNumbers
Range("AU17:BF17").Sort Key1:=Range("AU17"), Order1:=xlAscending, Orientation:=xlLeftToRight, DataOption1:=xlSortTextAsNumbers
Range("AU18:BF18").Sort Key1:=Range("AU18"), Order1:=xlAscending, Orientation:=xlLeftToRight, DataOption1:=xlSortTextAsNumbers
Range("AU19:BF19").Sort Key1:=Range("AU19"), Order1:=xlAscending, Orientation:=xlLeftToRight, DataOption1:=xlSortTextAsNumbers
Range("AU20:BF20").Sort Key1:=Range("AU20"), Order1:=xlAscending, Orientation:=xlLeftToRight, DataOption1:=xlSortTextAsNumbers
Range("AU21:BF21").Sort Key1:=Range("AU21"), Order1:=xlAscending, Orientation:=xlLeftToRight, DataOption1:=xlSortTextAsNumbers
End Sub
After repeating the above on all sheets, i want to combine the values (using Paste:=xlPasteValues) of (BI10:DA21) from all visible sheets to a sheet called CSV_Export starting at A5 on that sheet and repeating doward till all visible sheets have been copied to that sheet. I have no idea of how to make it repeat on visible sheets.
Bookmarks