Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Question for T.Ogilvy
Hi Tom,
Thanks a lot for your help, I tried running by inserting the code but it didn't work, Do I insert this code within my original macro or is this a separate macro which I call from my original macro Sub ABCD() k = 5 For m = 1 To 20 With Worksheets("Change") With .Cells(k + 2, m).Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With End With Next End Sub for the blank line, change k = k + 3 to k = k + 4 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Question for T.Ogilvy
Sub des()
Worksheets.Add.Name = "Changes" k = 2 For i = 1 To 20 For j = 1 To 20 If Worksheets("Jobs").Cells(i, j) < _ Worksheets("Jobs2").Cells(i, j) Then Worksheets("Jobs2").Cells(i, j).EntireRow.Copy _ Destination:=Worksheets("Changes").Cells(k, 1) Worksheets("Jobs").Cells(i, j).EntireRow.Copy _ Destination:=Worksheets("Changes").Cells(k + 1, 1) With Worksheets("Changes") .Cells(k + 1, 1).ClearContents For m = 2 To 20 .Cells(k + 2, m).Value = .Cells(k, m) - .Cells(k + 1, m) With .Cells(k + 2, m).Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With Next m End With k = k + 3 Exit For End If Next j Next i End Sub -- Regards, Tom Ogilvy "teresa" wrote in message ... Hi Tom, Thanks a lot for your help, I tried running by inserting the code but it didn't work, Do I insert this code within my original macro or is this a separate macro which I call from my original macro Sub ABCD() k = 5 For m = 1 To 20 With Worksheets("Change") With .Cells(k + 2, m).Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With End With Next End Sub for the blank line, change k = k + 3 to k = k + 4 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Tom Ogilvy | Excel Programming | |||
Tom Ogilvy | Excel Programming | |||
Tom Ogilvy | Excel Programming | |||
Help Tom Ogilvy | Excel Programming | |||
Follow up question for Tom Ogilvy - linking a text box to an external workbook | Excel Programming |