Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks again, Tom.
Went with this modification of your sub which works well on the sheet. Private Sub Worksheet_Calculate() Dim i As Long Dim r As Range On Error GoTo ErrHandler Application.EnableEvents = False Range("E2:F20").Copy Range("G2").PasteSpecial xlValues For i = 20 To 2 Step -1 Set r = Cells(i, "G") If Trim(r.Text) = "" Then r.ClearContents If Trim(r.Offset(0, 1).Text) = "" Then _ r.Offset(0, 1).ClearContents Next Range("G2:H20").Sort Key1:=Range("G2"), _ Order1:=xlAscending, Header:=xlNo If Application.CountA(Range("G2:H20")) = 0 Then Range("G2").Value = "No Results to Sort" End If ErrHandler: Application.EnableEvents = True End Sub -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
OMIT BLANK LINES WHEN FORCING A CARRIAGE RETURN --- PLEASE HELP! | Excel Worksheet Functions | |||
copy formula down 1000,s of lines | Excel Worksheet Functions | |||
Whats the quickiest way to copy a formula down 13,000 lines in exc | Excel Discussion (Misc queries) | |||
Auto-copy of formula on inserted lines | Excel Discussion (Misc queries) | |||
Macro to copy range of formulas to equal data lines | Excel Worksheet Functions |