Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Borders 1

Status
Not open for further replies.

beanxx

Technical User
Jul 9, 2002
61
GB
I'm wanting to apply a border to only to polulated rows of data. I know that if I highlight the appropriate rows and apply a border, upon printing the report the border will only be depicted around the rows with text in, but on screen I get row upon row of blank lines with borders applied at the bottom of the report, which looks a bit messy. Any ideas?
 
Select your column. Go to Format, Conditional Formatting.
In Condition 1, say that "Cell Value Is," "not equal to," then type in ="" in the last box (no space between the quotes). Then click Format, select borders, and set your border. Click ok, then ok again. Your column should now outline each cell as it is filled, leaving blank cells with no border.
 
Thanks this kind of helps with this query, although it is a useful tip for other issues I have! The only problem with this solution is that there are some blank 'boxes' in the data rows, so obviously the condition won't apply to these 'boxes'.
 
Ok. I misinterpreted your post a little.
I thought, for some reason, that the desired result was to put borders around only the populated cells.
I think what's happening in your situation is that you're selecting the columns, or rows, by clicking on their number or letter. This is going to apply your format selection to the entire range. If you want to contain the format to your page area, start with the actual beginning cell in each column or row and, while hlding down your right mouse button, highlight the range to which you want to apply the formatting. This will contain that messy bleed-over, and allow you to put borders around cells regardless of their content.
 
or, under File, Page Setup, Sheet tab, you have a Print Area designated and need to delete that.
 
Thanks for the advice. The only spanner in the works and perhaps I should have explained a little better, is the fact that the border formatting is to be done under a Macro I am recording for a report run on a daily basis which formats a raw .txt report, the problem is the amount of rows int he report will vary day on day.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top