Extract columns from excel to new sheet as repeated process

I'm sure my issue is not unique. I have a excel document with hundreds of columns and only want about a dozen of them. I need to be able to extract specific

columns to a new excel sheet as a repeated process without manual intervention.

All I need is to pull certain columns into a new excel sheet from an excel document that is updated daily.

Do we have an automated process where I can just run a macro and pull the updated data from an excel document into a new one?

Any help is greatly appreciated.

Thank you.

Ming A.

Answer
Answer

ALT+F11 > Insert Module > Paste the below code > run this Macro

Public Sub extractCol()
    Set range1 = Range("A:D, BI:BI, BQ:BQ,CL:CL,CM:CN,CT:CT,DB:DB")
    range1.Copy
    Set newbook = Workbooks.Add
    ActiveCell.PasteSpecial Paste:=xlPasteValues
End Sub

Wyman W
Human Resources

36 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated May 8, 2024 Views 21,208 Applies to: