Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Drawing a line for a set range

Hi

I currently have data in columns A - J.

I currently have a macro that separates the rows of data based on
variables (see below). What i need to incorporate into this is that
after each line is inserted to draw a line from Ax - Jx (where x is
the new row).



Sub Insert_Rows()

Rw = 2
LastRow = 20000

NxtChk:
If Cells(Rw, "B") < Cells(Rw + 1, "B") Then
Rows(Rw + 1).EntireRow.Insert

Rw = Rw + 1

NewRow = NewRow + 1
End If

If Rw = LastRow + NewRow Then Exit Sub
Rw = Rw + 1

GoTo NxtChk

ActiveWindow.DisplayGridlines = False

End Sub

Any help would be greatly appreciated.

Thanks
Neil
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 236
Default Drawing a line for a set range

Why do you need a line? Wouldn't a Border do instead?

Have you tried recording a macro for what you need and then fine-
tuning it?

On Mar 2, 12:40*am, Neil wrote:
Hi

I currently have data in columns A - J.

I currently have a macro that separates the rows of data based on
variables (see below). What i need to incorporate into this is that
after each line is inserted to draw a line from Ax - Jx (where x is
the new row).

Sub Insert_Rows()

Rw = 2
LastRow = 20000

NxtChk:
If Cells(Rw, "B") < Cells(Rw + 1, "B") Then
Rows(Rw + 1).EntireRow.Insert

Rw = Rw + 1

NewRow = NewRow + 1
End If

If Rw = LastRow + NewRow Then Exit Sub
Rw = Rw + 1

GoTo NxtChk

ActiveWindow.DisplayGridlines = False

End Sub

Any help would be greatly appreciated.

Thanks
Neil


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
Drawing a line on a chart ExcelGeek75 Charts and Charting in Excel 4 March 12th 10 01:00 PM
Automate line drawing in Excel Neil Perry Excel Programming 0 January 21st 09 10:50 AM
Need help with Drawing a Straight Line mginther Excel Discussion (Misc queries) 2 August 24th 07 06:20 PM
Line Position Drawing Object Marvin Excel Programming 9 October 29th 06 12:12 AM
Drawing a line in bar chart Julien Charts and Charting in Excel 1 January 6th 06 10:13 AM


All times are GMT +1. The time now is 08:25 PM.

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"