LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default Borders/Inserting Line

I have a couple of issues with my code:
1) Putting the borders in , my code to do this is asterisked below, doesnt

run
2)Also need to insert a line btw each account in Changes.xls

Thanks A Million


I want to get from:

Jobs.xls:

Client Jan Feb Mar
GATT 100 150 250
CHEV 99 200 400


Jobs2.xls:

Client Jan Feb Mar
GATT 200 250 350
CHEV 199 300 1000


i NEED TO GET TO:

Changes.XLS

Client Jan Feb Mar
GATT 200 250 350
100 150 250
-------------------------------
100 100 100

CHEV 199 300 1000
99 200 400
-------------------------------
100 100 600



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)
* .Cells(k + 2, m).borders (xlEdgeBottom)
* .Cells(k + 2, m).LineStyle = xlContinuous
* .Cells(k + 2, m).Weight = xlMedium
* .Cells(k + 2, m).ColorIndex = xlAutomatic
Next m
End With
k = k + 3
Exit For
End If
Next j
Next i

End Sub




 
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
Borders Line Colors julesjules2 Excel Discussion (Misc queries) 2 March 26th 10 01:22 PM
Changed grid line color, now cell borders don't show [email protected] Excel Discussion (Misc queries) 2 August 21st 06 04:51 PM
Borders Don't Line up with Cells. Michael Hesse Excel Discussion (Misc queries) 0 August 30th 05 04:08 PM
Borders/Inserting Lines teresa Excel Programming 1 December 14th 04 03:29 PM
Line styles for Cell Borders Carl Excel Discussion (Misc queries) 1 December 2nd 04 04:28 AM


All times are GMT +1. The time now is 03:35 AM.

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

About Us

"It's about Microsoft Excel"