Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

formatting

ResolvedVersion 2003

Fiona has attended:
Excel VBA Intro Intermediate course

Formatting

How do you format only the last line of a list of data? For example, if the last line is the total, how do you make sure that only that line is bold if you don't know what line the end line is?

RE: Formatting

Hi Fiona

Thanks for your question

You can select the last line by counting the rows in the current region. So

Range(Cells(Range("A7").CurrentRegion.Rows.Count, 1), _
Cells(Range("A7").CurrentRegion.Rows.Count, 5)).Font.Bold = True


sets the last line font to bold

Hope this helps

Regards

Stephen

Mon 17 May 2010: Automatically marked as resolved.

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

No Zeros

Want all the zeros in your worksheet to appear blank? Choose Tools/Options, Click on the View Tab, Deselect the Zero Values Option, Click OK.
Easy wasn't it? But be aware that these cells are not actually blank, they still contain the value zero. This is important because certain functions (ie AVERAGE) make a distinction between blank cells and those with a zero value.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.