Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default grid lines printing with blank cells

Hi,

I have a Macro that inserts gridlines into rows A50: F100, It
accommodates varied lengths of lists that start always start at row
50, and sometimes extend to row 100. Usually it only goes down about
20 rows to row #70. In that case, is there a way that I can prevent
the gridlines with blank cells in rows 71-100 from printing
automatically?

I would prefer it if there were some method that "automatically"
recognizes the text stops at row 70, so that it does not print the
gridlines from 71-100 if there is no text in them.

Do you know of a method to do that? I looked at the print gridlines
function in page setup, but that insets gridlines everywhere. I just
want gridlines past row 50.

Thanks,

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default grid lines printing with blank cells

Can we see your macro?

I suspect that you can use some variation of a statement like this to
determine the last row actually used on the sheet before you apply the
gridlines (borders?)

lastUsedRow = Range("A" & Rows.Count).End(xlUp).Row

You could use the value returned to adjust the range that you use to set up
the lines.

" wrote:

Hi,

I have a Macro that inserts gridlines into rows A50: F100, It
accommodates varied lengths of lists that start always start at row
50, and sometimes extend to row 100. Usually it only goes down about
20 rows to row #70. In that case, is there a way that I can prevent
the gridlines with blank cells in rows 71-100 from printing
automatically?

I would prefer it if there were some method that "automatically"
recognizes the text stops at row 70, so that it does not print the
gridlines from 71-100 if there is no text in them.

Do you know of a method to do that? I looked at the print gridlines
function in page setup, but that insets gridlines everywhere. I just
want gridlines past row 50.

Thanks,


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
Show grid lines when printing? TKM New Users to Excel 4 October 21st 06 03:52 AM
Printing Grid lines & Shaded cells apatec Excel Discussion (Misc queries) 0 August 18th 06 07:29 PM
printing grid lines when grid lines is checked fergos Setting up and Configuration of Excel 1 October 4th 05 02:55 AM
printing grid lines puddytatz Excel Discussion (Misc queries) 4 July 14th 05 07:35 PM
how do I print grid lines for blank rows gailrolfe Excel Discussion (Misc queries) 3 February 25th 05 05:22 AM


All times are GMT +1. The time now is 05:34 PM.

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"