Auto-sort data which changes based on new data being input into another sheet

analyst91

New Member
Joined
Jun 16, 2016
Messages
4
Hi all,

I have data in the following form:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Region[/TD]
[TD]Value[/TD]
[TD]Volume[/TD]
[/TR]
[TR]
[TD]North[/TD]
[TD]734198[/TD]
[TD]3409[/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD]429837[/TD]
[TD]8374[/TD]
[/TR]
[TR]
[TD]East[/TD]
[TD]384209[/TD]
[TD]1024[/TD]
[/TR]
[TR]
[TD]West[/TD]
[TD]636412[/TD]
[TD]3412[/TD]
[/TR]
</tbody>[/TABLE]

The data in this sheet is derived using a sumif() and countif() function on a separate sheet, and I'm trying to create a macro to auto-sort this data everytime a value changes. Any ideas how I can go about this, as any code I try seems to be dead?! (I insert the macro through the 'View Code' option as usual).

Many Thanks!
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Do you just have the 4 lines of data? If so, I'd recommend just using some LARGE formulas to auto sort them. Which column(s) are you sorting by? Do you need to account for ties?

The reason that your code seems to be "dead" may be because that after it sorts the data, the way your formulas work they may recalculate afterward, giving the same numbers. If you copy and paste values to another location, your sort may work.
 
Upvote 0

Forum statistics

Threads
1,226,730
Messages
6,192,711
Members
453,748
Latest member
akhtarf3

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