Is it possible to have a macro which automatically sorts a range of cells if any value in that range changes?
Is it possible to have a macro which automatically sorts a range of cells if any value in that range changes?
See link. Look forhttp://www.contextures.com/excelfiles.html#DataValUpdate Validation List
or this event macro. Right click the sheet then select view code and paste in the below
It will sort on Col A
VBA Noob![]()
Please Login or Register to view this content.
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
Thanks for that.
I have discovered a problem though.
The validation list is populated from values in another worksheet, and therefore the list contains formulas with cell references in.
When the value in the other worksheet changes, and the value is entered into the validation list the macro does not run.
Is there any way round this?
Worksheet_Change macro is triggered only if a cells contents are changed. This does not occur in cells with formulas
Try using a Worksheet_Calculate() macro
Please Read Forum Rules Before Posting
Wrap VBA code by selecting the code and clicking the # icon or Read This
How To Cross Post politely
Top Excel links for beginners to Experts
If you are pleased with a member's answer then use the Scales icon to rate it
If my reply has assistedor failed to assist you
I welcome your Feedback.
If anyone could explain how this could be done with a worksheet_calculate macro I would be very grateful.
Cheers
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks