• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Excel VBA

1. You can start yourself with a macro recorder. Whenever you are not sure about the VBA code then just record your actions using macro recorder and study them. After studying them (at beginning line by line and later by experience), you will be able to remove unwanted code.


2. Buy some good books that let you understand the concepts in a systematic manner.

a. Excel VBA and Macros by Bill Jelen

b. Power Programming with VBA by John Walkenbach


3. Read online stuff that is available which is huge. These sites have enormous amount of data so you can search items by googling.


Main thing will always be practice and your personal time. Wish you good luck!!!
 
Tarun.M


This has been discussed here at Chandoo.org several times

You may also want to read these post and associated comments:


http://chandoo.org/forums/topic/if-i-take-chandoos-vba-course

http://chandoo.org/wp/2011/08/29/introduction-to-vba-macros/

http://chandoo.org/wp/2011/09/06/top-10-tips-for-excel-vba/
 
Please let me know the code for selecting specific column.

Eg.

I want to select column A To C Then F To H Then K To L etc.
 
Read Hui's 3rd link thoroughly and it should get you underway.


The other great thing about VBA is you can be intuitive about terminology. A column is a column in VBA and a row is a row, now isn't that simple? You can easily search items at fair clip in object browser [by hitting F2 in Visual Basic Editor Window].


As for your question, try:

To select columns A to C at a time

Code:
Range("A:C,").Select


To select Array of non-contiguous columns use comma approach as we do in printing

Range("A:C,F:H,K:L").Select

Note To becomes : in VBA.
 
Back
Top