View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Clif McIrvin[_3_] Clif McIrvin[_3_] is offline
external usenet poster
 
Posts: 203
Default Spliting digits up to fit paper form

"GS" wrote in message
...


Clif,
You could eliminate the check for the decimal by stripping it out
before you loop...

strData = Replace(Format([A1], "0.00"), ".", "")

--
I was thinking to 'pad' the string to always be Len=9. The wks can be
CF'd to hide leading zeros in the first 7 cols. This way, the digits
can be loaded into an array and 'dumped' into the wks.



Good use of replace.

When always padding to 9 digits ocurred to me I went with worksheet
formulas instead of VBA.

Using your array idea, you could still work right to left and leave
leading zeroes as empty variants; i.e., BLANK cells and CF wouldn't be
necessary (and skip the padding.)

--
Clif McIrvin

(clare reads his mail with moe, nomail feeds the bit bucket :-)