Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Show grid lines when printing? | New Users to Excel | |||
Printing Grid lines & Shaded cells | Excel Discussion (Misc queries) | |||
printing grid lines when grid lines is checked | Setting up and Configuration of Excel | |||
printing grid lines | Excel Discussion (Misc queries) | |||
how do I print grid lines for blank rows | Excel Discussion (Misc queries) |