Thread: Dynamic Sorting
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Dr. Sachin Wagh
 
Posts: n/a
Default Dynamic Sorting

Works wonders, Thanx a Ton

--
Dr. Sachin Wagh
MBBS, DHA, DPH


"Bob Phillips" wrote:

Select the sheet2 worksheet, and then add this code

Option Explicit

Private Sub Worksheet_Calculate()

Me.Range("A1:B20").Sort key1:=Me.Range("B1"), header:=xlYes

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.



--

HTH

RP
(remove nothere from the email address if mailing direct)


"Dr. Sachin Wagh" wrote in message
...
Sheet 2 has 20 rows (Column 1 - Heading & Column 2 - Total). This is

linked
to Sheet 1 (thru vlookup).
I need to have these 20 rows sorted (Cloumn 2) in ascending manner, as the
figures of sheet 1 are changed. Is that possible?
--
Dr. Sachin Wagh
MBBS, DHA, DPH