Reversing order of headings (offset?)

TrimFunction

New Member
Joined
Jan 9, 2018
Messages
18
[TABLE="width: 500"]
<tbody>[TR]
[TD]F18Q1[/TD]
[TD]F18Q2[/TD]
[TD]F18Q3[/TD]
[TD]F18Q4[/TD]
[TD]F19Q1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

i created a report that has sales data displayed like this.

After a year, I realize it's not user friendly to scroll all the way to the right to see the most current data.

Is there a quick formula to transpose these in reverse, so that column A would have the most current data, while historical data is in Column B:Z?

Do i need to use an offset?
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Try something like

Code:
Dim arrRawData as Variant, arrSwapData as Variant
Dim i as Long, J as long

arrRawData = Range("A1").CurrentRegion.Value
arrSwapData = arrRawData

For i = 1 to UBound(arrRawData, 1)
    For j = 1 to UBound(arrRawData, 2)
        arrSwapData(i, j) = arrRawData(i, Ubound(arrRawData, 2) + 1 -j)
    Next j
Next i

Range("A1").CurrentRegion.Value = arrSwapData
 
Upvote 0
Assuming your FYYQ# headings are in row 1:
Select all the headers and data.
Data>Sort & Filter>Sort.
In the dialog box select Options Sort Left to Right.
Sort on Row 1 Z to A.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top