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

leaving column out report

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

ResolvedVersion 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:

Closing Multiple Open Worksheets At Once

When multiple Excel worksheets are opening, rather than performing a File > Close menu option multiple times, hold down the the SHIFT key and select the File > Close All menu option.

Close All menu option is only displayed when Shift key is down

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.11 secs.