If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How do I insert a single number down an entire column?
PLEASE HELP!?
I have a column that is 2000 cells tall each containing numeric four and five digit codes. I need all the four digit codes to receive a '0' in the front to make it five digits. How can I insert the '0' before each of the four digit codes all the way down my column? Thank you in advance to anyone who knows the answer to my sad, sad, question. Rob. --- Message posted from http://www.ExcelForum.com/ |
#2
|
|||
|
|||
How do I insert a single number down an entire column?
try this
Sub addnum() For Each c In Range("c1:c2000") c.Value = "1" & c Next End Sub -- Don Guillett SalesAid Software "robpearl " wrote in message ... PLEASE HELP!? I have a column that is 2000 cells tall each containing numeric four and five digit codes. I need all the four digit codes to receive a '0' in the front to make it five digits. How can I insert the '0' before each of the four digit codes all the way down my column? Thank you in advance to anyone who knows the answer to my sad, sad, question. Rob. --- Message posted from http://www.ExcelForum.com/ |
#3
|
|||
|
|||
How do I insert a single number down an entire column?
Would simple formatting do what you want, or do you physically need the extra
character. If you select the entire range and format as number / custom / "00000" then all numbers will appear as 5 digits in length. -- Regards Ken....................... Microsoft MVP - Excel Sys Spec - Win XP Pro / XL 97/00/02/03 ---------------------------------------------------------------------------- It's easier to beg forgiveness than ask permission :-) ---------------------------------------------------------------------------- "robpearl " wrote in message ... PLEASE HELP!? I have a column that is 2000 cells tall each containing numeric four and five digit codes. I need all the four digit codes to receive a '0' in the front to make it five digits. How can I insert the '0' before each of the four digit codes all the way down my column? Thank you in advance to anyone who knows the answer to my sad, sad, question. Rob. --- Message posted from http://www.ExcelForum.com/ --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.676 / Virus Database: 438 - Release Date: 03/05/2004 |
#4
|
|||
|
|||
How do I insert a single number down an entire column?
Assuming your data is in column A, Format column B as TEXT and in B1 put
this formula and copy it down your 2000 lines............ IF(LEN(A1)=4,0&A1,A1 Vaya con Dios, Chuck, CABGx3 "robpearl " wrote in message ... PLEASE HELP!? I have a column that is 2000 cells tall each containing numeric four and five digit codes. I need all the four digit codes to receive a '0' in the front to make it five digits. How can I insert the '0' before each of the four digit codes all the way down my column? Thank you in advance to anyone who knows the answer to my sad, sad, question. Rob. --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | |
Display Modes | |
|
|