Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tom Ogilvy Jonsson Excel Programming 4 September 18th 04 01:18 AM
Tom Ogilvy David Joseph Excel Programming 0 April 21st 04 02:57 PM
Tom Ogilvy David Joseph Excel Programming 1 April 21st 04 12:38 AM
Help Tom Ogilvy [email protected] Excel Programming 9 January 18th 04 11:18 PM
Follow up question for Tom Ogilvy - linking a text box to an external workbook JENNA Excel Programming 2 January 17th 04 11:29 PM


All times are GMT +1. The time now is 04:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"