Macro for creating different sheets from a worksheet column

abhirupganguli123

Board Regular
Joined
Feb 25, 2014
Messages
55
Hi,

I have a spreadsheet with 'N' number of columns. I want to create seperate worksheets based on a column data through a macro. Since I have many of such sheets with no fixed columns, so the macro should ask from which column I want to create sheets. I will give the column number (1,2,3 etc) and the macro will create new sheets in the existing workbook with data. The base data sheet will remain as the first sheet. I have other 4 criteiras -

1) The cell formats will be exactly same as the base data sheet.
2) The sheet names will be same as the column data.
3) If any description of the column data is too long for being a sheet name, then it will take maximum letters starting from first that a sheet name can have.
4) If the description of the column data has any symbol that a sheet name can not have (like "/"), then it will replace the symbol with a space while making the sheet name.

Can anybody please help me with such VBA code ?

Thanks,
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,214,918
Messages
6,122,257
Members
449,075
Latest member
staticfluids

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