Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default 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.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default 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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot table treating numbers as text in value field Rune Wentzel Helms Excel Worksheet Functions 2 July 3rd 09 09:15 AM
userform combobox treating numbers as text apndas[_5_] Excel Programming 2 July 18th 06 04:39 AM
Sort does not preserve string of additions HollywoodSam Excel Worksheet Functions 1 June 4th 06 04:29 PM
How do I write code to preserve variables values for future use. Paul Excel Programming 2 December 12th 05 04:21 PM
How to import a text file to Excel treating all input content are in string. Chittu Excel Discussion (Misc queries) 1 July 22nd 05 06:37 AM


All times are GMT +1. The time now is 11:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"