Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
RH RH is offline
external usenet poster
 
Posts: 17
Default Convert Text to Number

Can ICF-210-3-10a be converted into a number?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Convert Text to Number

easily:

=MID(A1,5,3) returns the 210
=MID(A1,9,1) returns the 3
=MID(A1,11,2) returns the 10

--
Gary''s Student - gsnu200817
  #3   Report Post  
Posted to microsoft.public.excel.misc
RH RH is offline
external usenet poster
 
Posts: 17
Default Convert Text to Number

Within a named cell range I'm having my formula look-up the model numbers
ICF-210-3-10a, BFF-22-10b. Another cell gathers the look-up information and
creates a calculation. I'm not sure how to turn ICF-210-3-10a into the
number. Could you help?

"Gary''s Student" wrote:

easily:

=MID(A1,5,3) returns the 210
=MID(A1,9,1) returns the 3
=MID(A1,11,2) returns the 10

--
Gary''s Student - gsnu200817

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Convert Text to Number

We will convert using a VLOOKUP Table:

Say we have a list of model ids in a column, say column A:

Model
QHO-319-78-78a
ACG-221-42-62r
LZQ-11-37-15g
MCB-43-13-83l
CEJ-101-61-32a
KOR-121-39-68a
UQJ-474-35-94x
DHF-130-66-98z
JYM-263-23-11a
JCD-432-19-40k
EQB-489-81-75x
XGJ-237-47-90j
ZOA-47-55-69u
XGV-185-25-23c
SWE-258-63-68d
XIN-257-10-29o
OXI-217-51-21b
LFU-286-34-79l
CAO-356-99-27d
DHC-280-76-16x
BEJ-195-84-78l
TXT-419-83-11s
FWZ-409-93-51t
MYW-325-43-64v
QMD-180-28-12l
WYF-155-33-57y
OEP-128-85-35g
JNE-308-82-54e
HVY-68-67-44k

we assume that the model ids are unique. In B1 thru B29 enter 1 thru 29.

These are the numbers associated with each text value. Use VLOOKUP() to get
the number from a cell containing the model id.

--
Gary''s Student - gsnu200817


"RH" wrote:

Within a named cell range I'm having my formula look-up the model numbers
ICF-210-3-10a, BFF-22-10b. Another cell gathers the look-up information and
creates a calculation. I'm not sure how to turn ICF-210-3-10a into the
number. Could you help?

"Gary''s Student" wrote:

easily:

=MID(A1,5,3) returns the 210
=MID(A1,9,1) returns the 3
=MID(A1,11,2) returns the 10

--
Gary''s Student - gsnu200817

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Convert Text to Number

Easily done using a UDF

Function RemAlpha(str As String) As String
'Remove all but numerics from a string
Dim re As Object
Set re = CreateObject("vbscript.regexp")
re.Global = True
re.Pattern = "\D"
RemAlpha = re.Replace(str, "")
End Function

Copy the UDF to a workbook module then using a helper cell enter

=RemAlpha(cellref)


Gord Dibben MS Excel MVP

On Mon, 1 Dec 2008 06:39:02 -0800, RH wrote:

Can ICF-210-3-10a be converted into a number?




  #6   Report Post  
Posted to microsoft.public.excel.misc
RH RH is offline
external usenet poster
 
Posts: 17
Default Convert Text to Number

This is great - Thanks so much.

"Gary''s Student" wrote:

We will convert using a VLOOKUP Table:

Say we have a list of model ids in a column, say column A:

Model
QHO-319-78-78a
ACG-221-42-62r
LZQ-11-37-15g
MCB-43-13-83l
CEJ-101-61-32a
KOR-121-39-68a
UQJ-474-35-94x
DHF-130-66-98z
JYM-263-23-11a
JCD-432-19-40k
EQB-489-81-75x
XGJ-237-47-90j
ZOA-47-55-69u
XGV-185-25-23c
SWE-258-63-68d
XIN-257-10-29o
OXI-217-51-21b
LFU-286-34-79l
CAO-356-99-27d
DHC-280-76-16x
BEJ-195-84-78l
TXT-419-83-11s
FWZ-409-93-51t
MYW-325-43-64v
QMD-180-28-12l
WYF-155-33-57y
OEP-128-85-35g
JNE-308-82-54e
HVY-68-67-44k

we assume that the model ids are unique. In B1 thru B29 enter 1 thru 29.

These are the numbers associated with each text value. Use VLOOKUP() to get
the number from a cell containing the model id.

--
Gary''s Student - gsnu200817


"RH" wrote:

Within a named cell range I'm having my formula look-up the model numbers
ICF-210-3-10a, BFF-22-10b. Another cell gathers the look-up information and
creates a calculation. I'm not sure how to turn ICF-210-3-10a into the
number. Could you help?

"Gary''s Student" wrote:

easily:

=MID(A1,5,3) returns the 210
=MID(A1,9,1) returns the 3
=MID(A1,11,2) returns the 10

--
Gary''s Student - gsnu200817

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert text number to number formate [email protected] Excel Discussion (Misc queries) 2 April 9th 07 10:48 AM
Convert text to number Donna S Excel Discussion (Misc queries) 9 October 26th 06 09:17 PM
HOW TO CONVERT NUMBER TO TEXT cretesupplies Excel Discussion (Misc queries) 1 March 16th 06 11:35 AM
convert text-format number to number in excel 2000%3f Larry Excel Discussion (Misc queries) 1 July 29th 05 08:18 PM
not able to convert text, or graphic number to regular number in e knutsenk Excel Worksheet Functions 1 April 2nd 05 08:41 AM


All times are GMT +1. The time now is 07:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"