View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
rexie3 rexie3 is offline
external usenet poster
 
Posts: 14
Default How do I create a macro to add zeros in front of a value?

Hello Don,

Unfortunately, I can't use the custom format because I have to format as a
text. I will be using the vlookup later to compare the data with another
sheet.

I wanted a macro because not all have the same # of characters. Some I have
to add 3 zeros and others 2, etc. It has become a nightmare.

But thank you anyway for answering, it was my fault, in my panic I forgot to
be more specific.

"Don Guillett" wrote:

an easy way is to custom format to the number of 0's desired IF they are the
same length.
000000000000

--
Don Guillett
SalesAid Software

"rexie3" wrote in message
...
PLEASE SOMEONE HELP ME!!!

I have to add zeros to over 61,000 line items in excel. I need to know
how
to create a macro that will enable me to select a range within the same
column and have zeros added to the the numbers in the cell.

I would be eternally greatful.
Thanking you in advance.