Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto Number Formats
Can anyone help.
The following code is part of a number generator, that fills a column with numbers in the format "0000" ie on 5 instances of AI, numbers 0700 - 0704 will be generated. However, when I try to add "+" or "-" to the end of the number, the numbers generated are 0700+, 701+, 702+, 703+, 704+. After the first instance I loose the leading "0". Any ideas on how I can maintain my number format, and also add "+" or "-" to the end of it. Thanks Alec Case "AI" .Offset(0, 4).Value = counter(4 * Z - 2, 0) & "+" If counter(4 * Z - 2, 1) = B Then counter(4 * Z - 2, 1) = 0 counter(4 * Z - 2, 0) = counter(4 * Z - 2, 0) + 100 - B Else counter(4 * Z - 2, 1) = counter(4 * Z - 2, 1) + 1 counter(4 * Z - 2, 0) = counter(4 * Z - 2, 0) + 1 End If .. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto Number the Rows of Auto Filter Result | Excel Discussion (Misc queries) | |||
Excel auto formats cells with numbers - Can it be disabled? | Setting up and Configuration of Excel | |||
How to have formulas and formats auto copy to new inserted rows | Excel Discussion (Misc queries) | |||
auto formats | Excel Worksheet Functions | |||
Find and Replace - Auto Cell Formats | Excel Programming |