Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 54
Default How to extract just text from cells

Hi all,

I want to extract only TEXT from a column of numbers and text. For example:

WHAT I HAVE:
150mgdl
2000mg
10mgdl
500cc

WHAT I WANT:
mgdl
mg
mgdl
cc

is there a function in Excel that does this and extracts only the text, not
the numbers?

Thanks everyone!



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default How to extract just text from cells

Try this:
=MID(A15,SUMPRODUCT(--ISNUMBER(--MID(A1,ROW($1:$999),1)))+1,999)


Regards,
Ryan--

--
RyGuy


"Access Joe" wrote:

Hi all,

I want to extract only TEXT from a column of numbers and text. For example:

WHAT I HAVE:
150mgdl
2000mg
10mgdl
500cc

WHAT I WANT:
mgdl
mg
mgdl
cc

is there a function in Excel that does this and extracts only the text, not
the numbers?

Thanks everyone!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 54
Default How to extract just text from cells

PERFECT - THANKS!

"ryguy7272" wrote:

Try this:
=MID(A15,SUMPRODUCT(--ISNUMBER(--MID(A1,ROW($1:$999),1)))+1,999)


Regards,
Ryan--

--
RyGuy


"Access Joe" wrote:

Hi all,

I want to extract only TEXT from a column of numbers and text. For example:

WHAT I HAVE:
150mgdl
2000mg
10mgdl
500cc

WHAT I WANT:
mgdl
mg
mgdl
cc

is there a function in Excel that does this and extracts only the text, not
the numbers?

Thanks everyone!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default How to extract just text from cells

This shoudl work as well:
Function RemDigits(str As String) As String
Dim re As Object
Set re = CreateObject("vbscript.regexp")
re.Global = True
re.Pattern = "\d+"
RemDigits = re.Replace(str, "")
End Function

Regards,
Ryan--

--
RyGuy


"Access Joe" wrote:

Hi all,

I want to extract only TEXT from a column of numbers and text. For example:

WHAT I HAVE:
150mgdl
2000mg
10mgdl
500cc

WHAT I WANT:
mgdl
mg
mgdl
cc

is there a function in Excel that does this and extracts only the text, not
the numbers?

Thanks everyone!



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default How to extract just text from cells

If that was helpful, click 'Yes' to indicate that!!

Thanks,
Ryan--

--
RyGuy


"ryguy7272" wrote:

This shoudl work as well:
Function RemDigits(str As String) As String
Dim re As Object
Set re = CreateObject("vbscript.regexp")
re.Global = True
re.Pattern = "\d+"
RemDigits = re.Replace(str, "")
End Function

Regards,
Ryan--

--
RyGuy


"Access Joe" wrote:

Hi all,

I want to extract only TEXT from a column of numbers and text. For example:

WHAT I HAVE:
150mgdl
2000mg
10mgdl
500cc

WHAT I WANT:
mgdl
mg
mgdl
cc

is there a function in Excel that does this and extracts only the text, not
the numbers?

Thanks everyone!





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
Need to extract certain text from text string Trista @ Pacific Excel Worksheet Functions 4 November 21st 07 07:07 PM
Extract text from large Text ldiaz Excel Discussion (Misc queries) 4 November 14th 07 01:21 AM
Text Extract Arturo Excel Worksheet Functions 1 December 12th 05 04:24 PM
EXTRACT TEXT FROM TEXT STRING carricka Excel Worksheet Functions 4 July 8th 05 11:00 AM
Extract text someone Excel Worksheet Functions 12 January 23rd 05 12:24 AM


All times are GMT +1. The time now is 02:54 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"