• 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.

How to select Multiple columns in a table using Macro

sreekhosh

Member
Hi,

I have a table containing more than 10 Headers. How to select and copy multiple headers at a time using macro.

I need to copy below Headers from my table.

Account Name, Cleint Name, Eng Number, Revenue.

I am using below code for selecting single column header,

Range("Table1[Account Name]").Select


Regards

Sreekhosh
 
Hi

Put a comma between your Headers as such:

Range("Table1[aa],Table1[bb]").Select
regards

kanti
 
Thanks Kanti,

I also tried the same. But is there any way to do the same with out repeating table name (ie: "Table1").

Thanks
Sreekhosh
 
Hi, sreekhosh!
Tried this?
Range("Tabla1[[#Headers],[Account Name]:[Revenue]]").Copy Worksheets(2).[C5]
Adjust output as required.
Regards?
 
Hi SirJB7,

Thank you for the effort.

but i got Runtime Error '1004' Method range of object Global failed.

Regards
Sreekhosh.
 
Back
Top