vba code to create multiple excel files in a folder and copy specific columns from master file to created excel files

Pavithra devi

New Member
Joined
May 14, 2021
Messages
1
Office Version
  1. 2019
Platform
  1. Windows
Hello all,

Good day!!

I am a newbie to vba code, I want to create a vba code to create multiple excel files in an folder, and I have a master file specific columns has to be copied from that master file to created excel file!

Master File:
Column A | Column B | Column C | Column D | Column E | Column F | Column G | Column H likewise till Column AC

I want to copy
Excel 1: Column A, Column B, Column C, Column D and Column E
Excel 2: Column A, Column B, Column C, Column D and Column F
Excel 3: Column A, Column B, Column C, Column D and Column G
Excel 4: Column A, Column B, Column C, Column D and Column H
Excel 5: Column A, Column B, Column C, Column D and Column I
Excel 6: Column A, Column B, Column C, Column D and Column J
.
.
.
.
..
Excel 25: Column A, Column B, Column C, Column D and Column AC


I hope to save a lot of time with this macro instead of manually copying and pasting data from master excel to different excel!

Please help me get through this!!

Thanks in Advance!!
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
What is the name of the sheet in the Master file that contains the columns to be copied? What is the full path to the folder where you want to save the new files and how do you want to name each new file?
 
Upvote 0

Forum statistics

Threads
1,214,387
Messages
6,119,222
Members
448,877
Latest member
gb24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top