How to name excel sheets on values in columns
Solved/Closed
eskagsms
eskagsms
- Posts
- 24
- Registration date
- Wednesday February 9, 2011
- Status
- Member
- Last seen
- May 30, 2012
eskagsms
- Posts
- 24
- Registration date
- Wednesday February 9, 2011
- Status
- Member
- Last seen
- May 30, 2012
Related:
- How to name excel sheets on values in columns
- Excel - Moving row values into column values - How-To - Excel
- Comparing values of two Excel sheets ✓ - Forum - Excel
- How to compare two excel sheets for differences in values ✓ - Forum - Excel
- How to compare two Excel sheets with varying data ✓ - Forum - Excel
- How to screenshot excel sheet - Guide
5 replies
rizvisa1
Feb 9, 2011 at 06:38 AM
- Posts
- 4479
- Registration date
- Thursday January 28, 2010
- Status
- Contributor
- Last seen
- May 5, 2022
Feb 9, 2011 at 06:38 AM
you can loop thru each name
create a sheet with that name
some thing like this
create a sheet with that name
some thing like this
Dim lRow As Long Dim sSrcSheet As String sSrcSheet = "Sheet1" 'the name of the sheet that has the names lRow = 1 Do While (Sheets(sSrcSheet).Cells(lRow, "A") <> vbNullString) Sheets.Add ActiveSheet.Name = Sheets(sSrcSheet).Cells(lRow, "A") lRow = lRow + 1 Loop
eskagsms
Feb 11, 2011 at 01:46 AM
- Posts
- 24
- Registration date
- Wednesday February 9, 2011
- Status
- Member
- Last seen
- May 30, 2012
Feb 11, 2011 at 01:46 AM
Hello Riz,
I tried to paste the above in a module window and ran it, but it is not recognising the "Sheet1" parameter.
Please can you help.
Regards,
Eskagsms
I tried to paste the above in a module window and ran it, but it is not recognising the "Sheet1" parameter.
Please can you help.
Regards,
Eskagsms
rizvisa1
Feb 11, 2011 at 06:15 AM
- Posts
- 4479
- Registration date
- Thursday January 28, 2010
- Status
- Contributor
- Last seen
- May 5, 2022
Feb 11, 2011 at 06:15 AM
do you have a sheet called "Sheet1" ?
Could you please upload a sample EXCEL file WITH sample data, macro, formula , conditional formatting etc on some shared site like https://authentification.site , http://docs.google.com, http://wikisend.com/ , [http://www.editgrid.com etc
AND post back here the link to allow better understanding of how it is now and how you foresee. Based on the sample book, could you re-explain your problem too.
Note: your data need not be to be real data but a good representative of how data looks like
Could you please upload a sample EXCEL file WITH sample data, macro, formula , conditional formatting etc on some shared site like https://authentification.site , http://docs.google.com, http://wikisend.com/ , [http://www.editgrid.com etc
AND post back here the link to allow better understanding of how it is now and how you foresee. Based on the sample book, could you re-explain your problem too.
Note: your data need not be to be real data but a good representative of how data looks like
eskagsms
Feb 11, 2011 at 06:52 AM
- Posts
- 24
- Registration date
- Wednesday February 9, 2011
- Status
- Member
- Last seen
- May 30, 2012
Feb 11, 2011 at 06:52 AM
Hello Riz,
I have uploaded a sample file at https://authentification.site/files/26805749/Sample.xls for your reference.
Please can you help.
Regards,
Eskagsms
I have uploaded a sample file at https://authentification.site/files/26805749/Sample.xls for your reference.
Please can you help.
Regards,
Eskagsms
rizvisa1
Feb 11, 2011 at 10:56 AM
- Posts
- 4479
- Registration date
- Thursday January 28, 2010
- Status
- Contributor
- Last seen
- May 5, 2022
Feb 11, 2011 at 10:56 AM
I just took your file and used the code. It created all the sheets. What issue you are facing.
eskagsms
Feb 12, 2011 at 12:07 AM
- Posts
- 24
- Registration date
- Wednesday February 9, 2011
- Status
- Member
- Last seen
- May 30, 2012
Feb 12, 2011 at 12:07 AM
Hello Riz, please find attached the screen shot of the error for your reference.
Please can you advise the steps to use the code? I have uploaded the file at http://www.speedyshare.com/files/26819376/Macro_error_message.bmp
Regards,
Eskagsms
Please can you advise the steps to use the code? I have uploaded the file at http://www.speedyshare.com/files/26819376/Macro_error_message.bmp
Regards,
Eskagsms
rizvisa1
Feb 12, 2011 at 09:13 AM
- Posts
- 4479
- Registration date
- Thursday January 28, 2010
- Status
- Contributor
- Last seen
- May 5, 2022
Feb 12, 2011 at 09:13 AM
The code was just for how to name. You cannot add code like that. It has to be enclosed in a sub or function
Public Sub doRenameSheet() Dim lRow As Long Dim sSrcSheet As String sSrcSheet = "Sheet1" 'the name of the sheet that has the names lRow = 1 Do While (Sheets(sSrcSheet).Cells(lRow, "A") <> vbNullString) Sheets.Add ActiveSheet.Name = Sheets(sSrcSheet).Cells(lRow, "A") lRow = lRow + 1 Loop End Sub
Didn't find the answer you are looking for?
Ask a question
eskagsms
Feb 14, 2011 at 01:01 AM
- Posts
- 24
- Registration date
- Wednesday February 9, 2011
- Status
- Member
- Last seen
- May 30, 2012
Feb 14, 2011 at 01:01 AM
That worked fine. The problem is resolved. Thank you very much Riz.
Regards,
Eskagsms
Regards,
Eskagsms