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

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
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,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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