View Single Post
Old November 25th, 2008   #5 (permalink)
R4+Z
Senior Member

Activity Longevity
8/20 14/20
Today Posts
0/0 ssssss764
Rep Power: 6R4+Z is on a distinguished road
Country:
Just a note.

I usually list up both CMD73 & CMD94, merge the two, then sort them and just accept that it will show them as overlaps. If you want it prettier you could write the macro to delete overlaps like that from the list.

The macro that does the job automatically if you know how to create it is .....
Sub check_list()

totrows = Range("D1").CurrentRegion.Rows.Count
Range("I1").Select
ActiveCell.FormulaR1C1 = "="
Range("H1").Select
ActiveCell.FormulaR1C1 = "IF(D2=""NONE"","""",IF(D2=""DATA NOT FOUND"","""",IF(D2=""DATA ERROR"","""",IF(VALUE(LEFT(D2,3))<(VALUE(LEFT(D1,3 )))+(VALUE(RIGHT(D1,1))),""Overlap"",IF(VALUE(LEFT (D2,3))=(VALUE(LEFT(D1,3)))+(VALUE(RIGHT(D1,1)))," """,IF(VALUE(LEFT(D2,3))>(VALUE(LEFT(D1,3))+(VALUE (RIGHT(D1,1)))),""Space"",))))))"
Range("G1").Select
ActiveCell.FormulaR1C1 = "=RC[2]&RC[1]"
Range("G1").Select
Range("G1").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.SmallScroll Down:=-6
ActiveSheet.Paste
Application.CutCopyMode = False
Columns("G:G").Select
Selection.Replace What:="2", Replacement:="2", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("H1:I1").Select
Selection.ClearContents
Range("G1").Select
Selection.AutoFill Destination:=Range("G1:G" & totrows), Type:=xlFillDefault
Range("G1:G400").Select

Range("H2").Select
End Sub

Last edited by R4+Z; November 25th, 2008 at 12:55 AM. Reason: to add the macro code.
R4+Z is offline   sendpm.gif Reply With Quote