Hi all
I was wondering if someone can help me with some macro wizardry for my Dashboard project. Full disclosure, I have previously posted this on Excelforum but haven't received a response...
I have cost data divided into two groups (direct/indirect expenses - Ranges B3:H7 and B11:H15). In each of the cost groups there are two separate columns showing the percentage delta between 1) the previous year and the current run-rate and 2) the percentage change month-on-month.
The goal is to enable the user to sort both of these columns in descending order via a macro assigned to shapes. A third shape should undo the sorting and change the data back to original order.
I am a beginner with macros and therefore have no idea how to accomplish this. Here is my attempt which is covering only one part of what I am trying to achieve.
Sub sb_VBA_Sort_Data_Descending()
With Worksheets("Data")
Range("B4:H7").Sort _
Key1:=Range("H3"), Order1:=xlDescending
End With
End Sub
I would appreciate any help I could get.
Thank you!
I was wondering if someone can help me with some macro wizardry for my Dashboard project. Full disclosure, I have previously posted this on Excelforum but haven't received a response...
I have cost data divided into two groups (direct/indirect expenses - Ranges B3:H7 and B11:H15). In each of the cost groups there are two separate columns showing the percentage delta between 1) the previous year and the current run-rate and 2) the percentage change month-on-month.
The goal is to enable the user to sort both of these columns in descending order via a macro assigned to shapes. A third shape should undo the sorting and change the data back to original order.
I am a beginner with macros and therefore have no idea how to accomplish this. Here is my attempt which is covering only one part of what I am trying to achieve.
Sub sb_VBA_Sort_Data_Descending()
With Worksheets("Data")
Range("B4:H7").Sort _
Key1:=Range("H3"), Order1:=xlDescending
End With
End Sub
I would appreciate any help I could get.
Thank you!
Attachments
Last edited: