Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #2   Report Post  
Myrna Larson
 
Posts: n/a
Default

Me, I prefer a more pointer-like approach, and I prefer to keep error
checking outside loops.


I'd call this a translation table rather than pointers. For the digits that
are not doubled, the digit N is translated to N + 1. For digits to be doubled,
you translate N to N * 2 + 1. In both cases, you subtract 9 if the result is
9.

Interestingly enough, the calls to Substitute and the Like function are so
slow that with this particular problem, it's actually faster to do the error
checking in-line. And that's in spite of your loop executing only half as many
times.




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
How do I use a check box to accept a calculation Joejoethecrackman Excel Discussion (Misc queries) 5 March 22nd 05 08:47 PM
Mod-10 Check Digit Union70 Excel Worksheet Functions 4 March 8th 05 07:58 AM
Tell users how to sort 5 digit and 9 digit zipcodes correctly aft. [email protected] New Users to Excel 1 February 18th 05 12:59 AM
Excel should have a function to verify the check digit on UPC num. Brian S B Excel Discussion (Misc queries) 1 February 1st 05 08:27 PM
Creating a check box that does not require security clearance. Maverick2U Excel Worksheet Functions 6 December 14th 04 02:46 AM


All times are GMT +1. The time now is 10:57 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"