D DrJimmy Registered User. Local time Today, 15:10 Joined Jan 10, 2008 Messages 49 Jun 9, 2009 #1 Hi, Does anyone know of a quick way of counting the number of digits within a given cell ref? Cheers
N namliam The Mailman - AWF VIP Local time Today, 16:10 Joined Aug 11, 2003 Messages 11,695 Jun 9, 2009 #2 len(row(reference)) Is that what you are looking for?
D DrJimmy Registered User. Local time Today, 15:10 Joined Jan 10, 2008 Messages 49 Jun 9, 2009 #3 Doesn't seem to give me the number I'd expect. When I apply it to a cell ref where the contents are 24.12 it says 16 is the answer. I'd expect eithe 4 or 5? Cheers
Doesn't seem to give me the number I'd expect. When I apply it to a cell ref where the contents are 24.12 it says 16 is the answer. I'd expect eithe 4 or 5? Cheers
M Mr. B "Doctor Access" Local time Today, 09:10 Joined May 20, 2009 Messages 1,932 Jun 9, 2009 #4 Just use: Len(Reference) this will return the length, including the decimal. To test, if your entry of 24.12 is in "B3" just enter in some other cell as: = Len(B3) you will get 5 You can use this Len() function in VBA also.
Just use: Len(Reference) this will return the length, including the decimal. To test, if your entry of 24.12 is in "B3" just enter in some other cell as: = Len(B3) you will get 5 You can use this Len() function in VBA also.
D DrJimmy Registered User. Local time Today, 15:10 Joined Jan 10, 2008 Messages 49 Jun 9, 2009 #5 That's done the trick. I tried it before and for some reason it didn't bring back the expected result. Oh well....! Cheers
That's done the trick. I tried it before and for some reason it didn't bring back the expected result. Oh well....! Cheers
N namliam The Mailman - AWF VIP Local time Today, 16:10 Joined Aug 11, 2003 Messages 11,695 Jun 9, 2009 #6 I was thinking just the Len() would to too easy ... LOL Glad you found it!
M Mr. B "Doctor Access" Local time Today, 09:10 Joined May 20, 2009 Messages 1,932 Jun 9, 2009 #7 Yeah, the "row" that you included would cause a problem with the Len() function. Glad to help.
N namliam The Mailman - AWF VIP Local time Today, 16:10 Joined Aug 11, 2003 Messages 11,695 Jun 9, 2009 #8 I interperted it is he as looking for the number of didgets on a full cell reference... i.e. A1 = 1 didget AA1 = 1 didget AA 10000 = 5 didgets.
I interperted it is he as looking for the number of didgets on a full cell reference... i.e. A1 = 1 didget AA1 = 1 didget AA 10000 = 5 didgets.