Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello,
I am trying to sort two different areas in one worksheet. I am trying to use the following code but it only works for the first area not the second. Sub Worksheet_Change(ByVal Target As Excel.Range) If Intersect(Range("h3:n500"), Target) Is Nothing Then Exit Sub Application.EnableEvents = False Range("h3:n500").Sort Key1:=Range("h3") Application.EnableEvents = True If Intersect(Range("p3:t500"), Target) Is Nothing Then Exit Sub Application.EnableEvents = False Range("p3:t500").Sort Key1:=Range("p3") Application.EnableEvents = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macros - copying macros from one computer to another | Excel Discussion (Misc queries) | |||
copy and use vba code | Excel Discussion (Misc queries) | |||
macro or code to open multiple workbooks | Excel Discussion (Misc queries) | |||
How to: Multiple "if" statements? | New Users to Excel | |||
Make Change Case in Excel a format rather than formula | Excel Worksheet Functions |