Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding zeros
ok, i have a string of code in my userform that looks like this:
If Application.CountIf(ws.Cells.Range("A1:A275"), *"000" TextBox1.Value*) 0 Then now, the thing is, i've discovered that saying 000 and textbox1.valu won't always give you the desired result, so, my question is, how can alter that line of code to say, textbox1.value and keep adding zeros i front of it, until there are 7 digits? thanks for helping me out : -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding zeros
Right("0000000" & Textbox1.Value, 7)
-- Regards, Tom Ogilvy "abxy " wrote in message ... ok, i have a string of code in my userform that looks like this: If Application.CountIf(ws.Cells.Range("A1:A275"), *"000" & TextBox1.Value*) 0 Then now, the thing is, i've discovered that saying 000 and textbox1.value won't always give you the desired result, so, my question is, how can i alter that line of code to say, textbox1.value and keep adding zeros in front of it, until there are 7 digits? thanks for helping me out :) --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding zeros
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
CONVERT NOs TO EAN 8 BY ADDING LEADING ZEROS | Excel Discussion (Misc queries) | |||
adding zeros to numbers in columns | Excel Discussion (Misc queries) | |||
adding zeros to a cell | Excel Discussion (Misc queries) | |||
Adding Leading Zeros to Text | Excel Discussion (Misc queries) | |||
Adding leading zeros to a calculated value | Excel Programming |