Excel macro create new sheet copy & paste cells
Closed
Matar
-
Jan 29, 2015 at 12:53 AM
pijaku Posts 12263 Registration date Wednesday May 14, 2008 Status Moderator Last seen January 4, 2024 - Jan 29, 2015 at 09:06 AM
pijaku Posts 12263 Registration date Wednesday May 14, 2008 Status Moderator Last seen January 4, 2024 - Jan 29, 2015 at 09:06 AM
Related:
- Excel macro create new sheet copy & paste cells
- Excel macro to create new sheet based on value in cells - Guide
- Mark sheet in excel - Guide
- Create skype account with gmail - Guide
- How to open excel sheet in notepad++ - Guide
- Create new instagram account without phone number - Guide
1 response
pijaku
Posts
12263
Registration date
Wednesday May 14, 2008
Status
Moderator
Last seen
January 4, 2024
1
Jan 29, 2015 at 09:06 AM
Jan 29, 2015 at 09:06 AM
Hi,
How many rows in Column "A"?
Warning, because Excel has limited Sheets's count to 255 max.
Is there duplicates in your column "A"?
Try this with a few data in column "A", this code is the first part of your question :
to create a new sheets with colum A name
If all is well for you, we will continue with the second part : copy row cells to the new sheet
How many rows in Column "A"?
Warning, because Excel has limited Sheets's count to 255 max.
Is there duplicates in your column "A"?
Try this with a few data in column "A", this code is the first part of your question :
to create a new sheets with colum A name
Option Explicit Sub CreateNewSheets() Dim LastRow As Long, lngRow As Long Application.ScreenUpdating = False With Sheets("Feuil1") '------------> ADAPT with your Sheets's name LastRow = .Range("A" & Rows.Count).End(xlUp).Row For lngRow = 2 To LastRow '-----> Start Row = 2 If Exist_Sheet(CStr(.Cells(lngRow, 1).Value)) = False Then ThisWorkbook.Sheets.Add ActiveSheet.Name = CStr(.Cells(lngRow, 1).Value) End If .Activate Next lngRow End With Application.ScreenUpdating = True End Sub 'Test if Sheets already exist Function Exist_Sheet(strWsh As String) As Boolean On Error Resume Next Exist_Sheet = (Sheets(strWsh).Name = strWsh) End Function
If all is well for you, we will continue with the second part : copy row cells to the new sheet