![]() |
TEXT Formula
I am using a text formula in a Macro to convert numbers to text. Some of the
numbers will be 5 digits and some will be 6 digits. How do I count the number of characters using the text formula? |
TEXT Formula
The LEN formula returns the number of characters in a cell, for instance if
you have NEW YORK 22 in A1, =LEN(A1) will return 11 which consists of 7 letters, 2 numbers and 2 spaces. Regards, Alan. "Buckeyefan" wrote in message ... I am using a text formula in a Macro to convert numbers to text. Some of the numbers will be 5 digits and some will be 6 digits. How do I count the number of characters using the text formula? |
TEXT Formula
Buckeyefan;254345 Wrote: I am using a text formula in a Macro to convert numbers to text. Some of the numbers will be 5 digits and some will be 6 digits. How do I count the number of characters using the text formula? I don't know VBA but to convert number to text I use the following formula =a1&"" -- Pecoflyer Cheers - *'Membership is free' (http://www.thecodecage.com)* & allows file upload -faster and better answers *Adding your XL version* to your post helps finding solution faster ------------------------------------------------------------------------ Pecoflyer's Profile: http://www.thecodecage.com/forumz/member.php?userid=14 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=71013 |
TEXT Formula
Sub test()
MyRange = Len(Range("$a$1")) 'a1=123456 MyValue = 123456 Debug.Print MyRange, Len(MyValue) End Sub It counts the decimal point also. So 123.456 len()=7 John "Buckeyefan" wrote in message ... I am using a text formula in a Macro to convert numbers to text. Some of the numbers will be 5 digits and some will be 6 digits. How do I count the number of characters using the text formula? |
All times are GMT +1. The time now is 03:10 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com