Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have a column of numbers 005445688996
005675556543 and so on. About 500 in all. I want to add a zero to the beginning of all the numbers. So example the first one reads: 0005445688996 and so on down the entire column. Please help. Jannie |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
try this
for each c in range("a2:a"&cells(rows.count,"a").end(xlup).row)) c.value="0" & c next c -- Don Guillett SalesAid Software "Jannie" wrote in message ... I have a column of numbers 005445688996 005675556543 and so on. About 500 in all. I want to add a zero to the beginning of all the numbers. So example the first one reads: 0005445688996 and so on down the entire column. Please help. Jannie |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
My column data starts in cell C3. I tried this formula but I don't think I'm
saying it right. Could you please write it out exactly like I should say it so I understand exactly what you mean. Thanks. "Don Guillett" wrote: try this for each c in range("a2:a"&cells(rows.count,"a").end(xlup).row)) c.value="0" & c next c -- Don Guillett SalesAid Software "Jannie" wrote in message ... I have a column of numbers 005445688996 005675556543 and so on. About 500 in all. I want to add a zero to the beginning of all the numbers. So example the first one reads: 0005445688996 and so on down the entire column. Please help. Jannie |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
In the helper column try this formula. Then copy/paste as values
="0"&c3 -- Don Guillett SalesAid Software "Don Guillett" wrote in message ... This is NOT a formula. It is a macro that must be copied into a module and executed. Just tested. Notice the ' before the 0 Sub addzerotostartofcell() For Each c In Range("c3:c" & _ Cells(Rows.Count, "c").End(xlUp).Row) c.Value = "'0" & c Next c -- Don Guillett SalesAid Software "Jannie" wrote in message ... My column data starts in cell C3. I tried this formula but I don't think I'm saying it right. Could you please write it out exactly like I should say it so I understand exactly what you mean. Thanks. "Don Guillett" wrote: try this for each c in range("a2:a"&cells(rows.count,"a").end(xlup).row)) c.value="0" & c next c -- Don Guillett SalesAid Software "Jannie" wrote in message ... I have a column of numbers 005445688996 005675556543 and so on. About 500 in all. I want to add a zero to the beginning of all the numbers. So example the first one reads: 0005445688996 and so on down the entire column. Please help. Jannie |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Jannie
If they are all going to be 13 digits then you could format the cells as custom 0000000000000 HTH Martin |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Martin:
when I try that it doesn't work because the numbers came from another source and it doesn't recognize the numbers as values. I tried copy and paste special to make them values but it's not working. I had to format the cells as numbers but it drops the leading zero so I'm trying to add it back. As far as the "macro module "thing I have never done that so I don't even know where to start. Isn't there an easier way for me to do this? Jannie "MartinW" wrote: Hi Jannie If they are all going to be 13 digits then you could format the cells as custom 0000000000000 HTH Martin |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Jannie
< I tried copy and paste special to make them values but it's not working. I had to format the cells By this do you mean you copied a 'blank' cell, then selected your data, then paste special, check 'add' and OK. This should convert all your data to numbers and then applying the custom format should put all your leading zeroes in place. HTH Martin |
#9
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
If your existing "numbers" are text strings, then =0&A1
If your existing numbers are actually numbers, but formatted, then you may need something like =0&TEXT(A1,"000000000000") -- David Biddulph "Jannie" wrote in message ... I have a column of numbers 005445688996 005675556543 and so on. About 500 in all. I want to add a zero to the beginning of all the numbers. So example the first one reads: 0005445688996 and so on down the entire column. Please help. Jannie |
#10
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
YES! David That worked perfect. Thank you all for helping!
Jannie "David Biddulph" wrote: If your existing "numbers" are text strings, then =0&A1 If your existing numbers are actually numbers, but formatted, then you may need something like =0&TEXT(A1,"000000000000") -- David Biddulph "Jannie" wrote in message ... I have a column of numbers 005445688996 005675556543 and so on. About 500 in all. I want to add a zero to the beginning of all the numbers. So example the first one reads: 0005445688996 and so on down the entire column. Please help. Jannie |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to add numbers to the left or right of the existing numbers? | Excel Discussion (Misc queries) | |||
ADDING NEW NUMBERS TO EXISTING WORKSHEET | New Users to Excel | |||
Doing Sums on existing numbers | Excel Worksheet Functions | |||
Adding numbers to current numbers | Excel Worksheet Functions | |||
How to add a 1 to existing column of phone numbers? | Excel Discussion (Misc queries) |