![]() |
Copying sheet with hidden columns
Hi,
By using code and a command button, I am creating a new sheet (sheet 2) and copying the contents of Sheet 1 to it. Works well except that i have formulae in the hidden columns and they are not being copied to Sheet 2. How can I get around this? -- Traa Dy Liooar Jock |
Copying sheet with hidden columns
Hi Jock,
Instead of creating a new sheet and copying cells etc to it; Use the Copy sheet method. Right click on the sheet name and select Move or copy and follow it from there. (You need to check the create copy box to copy) Record a macro while doing it if you need the VBA code. Regards, OssieMac "Jock" wrote: Hi, By using code and a command button, I am creating a new sheet (sheet 2) and copying the contents of Sheet 1 to it. Works well except that i have formulae in the hidden columns and they are not being copied to Sheet 2. How can I get around this? -- Traa Dy Liooar Jock |
Copying sheet with hidden columns
Hi OssieMac,
Thanks for the suggestion, however, I already have vba set up which creates a new sheet, names it and copies the active sheet to it. All works fine except for the formulae in hidden columns which aren't copied over. The hidden columns are still hidden, by the way, just with no data. -- Traa Dy Liooar Jock "OssieMac" wrote: Hi Jock, Instead of creating a new sheet and copying cells etc to it; Use the Copy sheet method. Right click on the sheet name and select Move or copy and follow it from there. (You need to check the create copy box to copy) Record a macro while doing it if you need the VBA code. Regards, OssieMac "Jock" wrote: Hi, By using code and a command button, I am creating a new sheet (sheet 2) and copying the contents of Sheet 1 to it. Works well except that i have formulae in the hidden columns and they are not being copied to Sheet 2. How can I get around this? -- Traa Dy Liooar Jock |
Copying sheet with hidden columns
Hi, Jock!
Are you saying if you unhide the column on the copy and select a cell where a formula should be, it doesn't show in the formula bar? James "Jock" wrote in message ... Hi OssieMac, Thanks for the suggestion, however, I already have vba set up which creates a new sheet, names it and copies the active sheet to it. All works fine except for the formulae in hidden columns which aren't copied over. The hidden columns are still hidden, by the way, just with no data. -- Traa Dy Liooar Jock "OssieMac" wrote: Hi Jock, Instead of creating a new sheet and copying cells etc to it; Use the Copy sheet method. Right click on the sheet name and select Move or copy and follow it from there. (You need to check the create copy box to copy) Record a macro while doing it if you need the VBA code. Regards, OssieMac "Jock" wrote: Hi, By using code and a command button, I am creating a new sheet (sheet 2) and copying the contents of Sheet 1 to it. Works well except that i have formulae in the hidden columns and they are not being copied to Sheet 2. How can I get around this? -- Traa Dy Liooar Jock |
Copying sheet with hidden columns
Hi Jock,
Does you code look something like this because if it does it should make an exact duplicate of the original sheet and give it a new name. Sheets("Sheet1").Copy Befo=Sheets(1) ActiveSheet.Name = "New Sheet" If you still have problems then can you post a copy the code you are using. Regards, OssieMac "Jock" wrote: Hi OssieMac, Thanks for the suggestion, however, I already have vba set up which creates a new sheet, names it and copies the active sheet to it. All works fine except for the formulae in hidden columns which aren't copied over. The hidden columns are still hidden, by the way, just with no data. -- Traa Dy Liooar Jock "OssieMac" wrote: Hi Jock, Instead of creating a new sheet and copying cells etc to it; Use the Copy sheet method. Right click on the sheet name and select Move or copy and follow it from there. (You need to check the create copy box to copy) Record a macro while doing it if you need the VBA code. Regards, OssieMac "Jock" wrote: Hi, By using code and a command button, I am creating a new sheet (sheet 2) and copying the contents of Sheet 1 to it. Works well except that i have formulae in the hidden columns and they are not being copied to Sheet 2. How can I get around this? -- Traa Dy Liooar Jock |
All times are GMT +1. The time now is 10:07 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com