Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Number the Rows of Auto Filter Result ashish128 Excel Discussion (Misc queries) 3 April 29th 07 06:41 PM
Excel auto formats cells with numbers - Can it be disabled? Jeromey Setting up and Configuration of Excel 1 May 21st 06 01:17 AM
How to have formulas and formats auto copy to new inserted rows DippyDawg Excel Discussion (Misc queries) 2 August 5th 05 03:09 PM
auto formats Jason Excel Worksheet Functions 2 February 13th 05 06:32 PM
Find and Replace - Auto Cell Formats bslater[_11_] Excel Programming 1 October 31st 03 10:13 PM


All times are GMT +1. The time now is 02:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"