I need to transpose my data so that I can use autofilter on it. This works, but seems like it is ineffecient. Does anyone have a better way of doing this?
I tried to do it without the intermediate step:
but it fails with an error message that doesn't fit in it's msgbox, so don't know how to address it: ("If you are using the create from Selection command the row or column containing the proposed frames won't be included in the")
Any improvements out there?
Code:
Sub Transpose500x300Array()
'
'
ActiveSheet.AutoFilterMode = False
'Copy the original array by selecting a 500x500 box around it.
Range("A1:RZ494").Copy
'Select an out-of-the-way destination
Range("A1001:RZ1494").Select
'Paste transposed into the selected area
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=True
'Copy this newly transposed array
Range("A1001:RZ1494").Copy
'Select the original range
Range("A1:RZ494").Select
'Paste back without transposing
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
End Sub
Code:
Sub Transpose500x5f00Array()
ActiveSheet.AutoFilterMode = False
Range("A1:RZ494").Copy
Range("A1:RZ494").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=True
Application.CutCopyMode = False
End Sub
Any improvements out there?