Hi there
I was thinking about creating a code that would add automatically a "0" at the beginning of the cell value if its length is 12. I realise I could play around with some formulas and get the result but I'd like to know how to approach this in VBA.
Eg. in reports I get numbers that in some cases I want as full numbers and not cut short like getting "99123000123" instead of "099123000123".
I've come up with the below which doesn't quite work... I also checked how VBA expects the number formats and the one that could help is "0"#, however in VBA I'd need to put it as ""0"#" which makes it impossible.
No idea though why it doesn't work in the first place but I'm quite bad at these things so that's probably the reason
CheersPlease Login or Register to view this content.
Bookmarks