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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,214,832
Messages
6,121,849
Members
449,051
Latest member
excelquestion515

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