Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easy Numeric Question

Status
Not open for further replies.

jessedh

MIS
Apr 16, 2002
96
US
I have a long value in excel 20021681010204300 and then I have a cumtom VBA function that pulls the string "81010204300" from this. The problem is that the data is the varying cells is sometimes numeric (as above) and sometimes text. How can I convert the numeric string above into a text version of it? The function only pulls correctly is all of the data is of the text type.

Thanks!
Jesse
 
Not being sure of how you function works, but in your example the RIGHT() function can be used as follows, assuming the first 'number' is in A1,

=RIGHT(TEXT(A1,"0"),11).

See if you can incorporate the TEXT function in your own formula.

A.C.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top