Link to home
Start Free TrialLog in
Avatar of fb1990
fb1990

asked on

Excel Macro to Extract Specific Columns to a New Tab

Hello EE,

I have data in one tab and i wanted to create a new tab called Expected and only copy and paste part of the data based on column address or column name. I have attached example.

I have the following columns in the data tab
Account      Customer State Achieved Earnings Customer2 Supervisor      President

I want create an new tab and call it Expected and copy data in the following columns into the Expected tab
Account       Customer Achieved Earnings Supervisor       President

Thanks in advance for your help
Sample.xlsx
ASKER CERTIFIED SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can achieve this with the Advanced Filter function.

The destination range can have as few or as many of the source headers and in whichever order you want.

Advanced Filter normally expects you to copy an extract of the data that meets a particular criteria, if you set the criteria so that it copies all rows you will get what is required.
Avatar of fb1990
fb1990

ASKER

Thanks to Neeraj and Rob.  Neeraj's solution gave me exactly what I want.  Thank you Sir.
You're welcome FB! Glad it worked as per your requirement.