formatting reports

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

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Formatting in reports

Formatting in reports

resolvedResolved · Medium Priority · Version 2007

Dave has attended:
Excel Advanced course
Excel VBA Intro Intermediate course

Formatting in reports

I will need to be able to create formatted reports with typical tables on a number of worksheets

Is there a way to create a template object, or series, that I can call rather than cutting and pasting into the worksheet ranges separately

RE: formatting in reports

Hi Dave

Thank you for your question

It is possible to write a procedure that would;
1. Create a new workbook
2. Place entries and value directly into certain cells
3. Format various cells as required.

as an example, the following code snippet shows you how to create a workbook ad some values and do some basic formatting


Application.Workbooks.Add

ActiveWorkbook.Sheets(1).Range("A1").Value = "My New Template"

ActiveWorkbook.Sheets(1).Range("A1").Interior.Color = vbRed

ActiveWindow.DisplayGridlines = False

ActiveWorkbook.Sheets(1).Columns("A").EntireColumn.AutoFit


Hope this is useful

Regards

Stephen

Wed 14 Jan 2009: 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:

Formula for last day of month

In some cases it is necessary to find the last day of a month for a given date. If you use the following formula, you can achieve this, ie; if you have a column of dates, use this formula to find the end of month for each day by using the fill handle. The formula is as follows, and assumes in this example that the first date in question is in cell C5, in any other cell type; =DATE(YEAR(C5),MONTH(C5)+1,1)-1

View all Excel hints and tips


Server loaded in 0.08 secs.