ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Treating numbers as string variables to preserve zeros at the beggining (https://www.excelbanter.com/excel-programming/373975-treating-numbers-string-variables-preserve-zeros-beggining.html)

Graham Whitehead

Treating numbers as string variables to preserve zeros at the beggining
 
Hi, I am just basically sorting through a huge dataset and grabbing unique
codes and storing them in an array for later use. Some of the codes are
numeric and some are alphanumeric therefore I am storing them as strings.
However, when a code is for example 000578 - once a recall this from the
array it has become 578. Is there anyway to preserve the entire code, i.e.
make the array recall 000578.
Thanks for any suggestions.



Jim Cone

Treating numbers as string variables to preserve zeros at the beggining
 
Format the cells that receive the recalled values as text.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"Graham Whitehead"
wrote in message
Hi, I am just basically sorting through a huge dataset and grabbing unique
codes and storing them in an array for later use. Some of the codes are
numeric and some are alphanumeric therefore I am storing them as strings.
However, when a code is for example 000578 - once a recall this from the
array it has become 578. Is there anyway to preserve the entire code, i.e.
make the array recall 000578.
Thanks for any suggestions.




All times are GMT +1. The time now is 09:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com