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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert letter value to number

Status
Not open for further replies.

newbiewonkinobie

Technical User
Dec 29, 2002
80
US
I have an item number, for example: in cell A1, which is 1224-A25, and I have a cell next to it that strips the last numbers after the first 4 digits. In column B, I have tried this 2 ways:
LEFT(A1,4)
and also:
=LEFT(A2,FIND("-",A2)-1)
I'm using conditional formatting to highlight the cell in column B if it matches a number in cell F3.
"Cell value is" "equal to" "=$f$3", format the cell yellow.
It does strip the values after the 1st 4 digits, but I know the return is not a number because the cell in column B doesn't change colors, and I can't do a "sum" on the returned values. I even formatted the cells to be numbers. How do I make the returned value be a number?

Flores
 
Slightly shorter and less functions:-

=--LEFT(A1,4)

Regards
Ken.............

----------------------------------------------------------------------------
Attitude - A little thing that makes a BIG difference
----------------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top