leaving column out report

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 » Leaving a column out of a report

Leaving a column out of a report

resolvedResolved · Low Priority · Version 2003

Tom has attended:
Excel VBA Intro Intermediate course

Leaving a column out of a report

Hi,

How do you leave a column out of a report, i.e. work with a non-continuous range of data?

Thanks,

Tom

RE: Leaving a column out of a report

Hi Tom, thanks for your query. There are a number of ways to achieve this using the code used on our course. However, all of them involve coding your way round the column you want to leave out.

You could set up two loops, one for before the column you want to leave out, and another for after. Alternatively, you could loop through as normal, but carry out an IF test each iteration, checking for the current index number of the column and if it's the one you want to leave out, simply skip to the next iteration of the loop. This is probably the way I would do it. However, you could set up named ranges for the individual regions and then copy them or code Pivot Tables using only the fields you want. VBA is a flexible tool, your solution just needs to be simple and fit for purpose.

Hope this helps,

Anthony

 

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:

Removing the Ribbon from view in Excel 2010

At times when you want to view the whole spreadsheet, try double clicking on the ''Home'' tab on the ribbon which will hide the ribbon from view.

View all Excel hints and tips


Server loaded in 0.07 secs.