Hello,
I have code which creates a designated numbers of folders eg 3 folders and saves a spreadsheet into the designated filepath. of each folder. The folders name and spreadsheet name is based on cell values in the spreadsheet
However i have come across a problem. The loop coding works fine when the cells are set up to act as numbers. The coding and loop works correctly when just have number as the cell format.
eg 500 501 502
The macro creates the folder correctly named in the folder and spreadsheet is saved into the there correctly named.
However i have case where have to deal with variable number of leading zeros (`0`s) some. folders and spreadsheets should be named for example as 000006 000045 000456 003456 012345
The length is always fixed at 6 digits
when i change the cell format to text the loop naming method doest work the leading zeros are missing off so 000006 becomes 6.
How to solve this??
I have code which creates a designated numbers of folders eg 3 folders and saves a spreadsheet into the designated filepath. of each folder. The folders name and spreadsheet name is based on cell values in the spreadsheet
However i have come across a problem. The loop coding works fine when the cells are set up to act as numbers. The coding and loop works correctly when just have number as the cell format.
eg 500 501 502
The macro creates the folder correctly named in the folder and spreadsheet is saved into the there correctly named.
However i have case where have to deal with variable number of leading zeros (`0`s) some. folders and spreadsheets should be named for example as 000006 000045 000456 003456 012345
The length is always fixed at 6 digits
when i change the cell format to text the loop naming method doest work the leading zeros are missing off so 000006 becomes 6.
How to solve this??