Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default how to extract only numbers

Hello..
I am having trouble with extracting numbers from merged cells

i have a top row that has lets say for example


"Company XYX 23432 R & P analysis"


without the quotes.. is there anyway to extract the 23432 which is
the company id from this merged cell


I am doing this because i need to do a vlookup and the 23432 is the
lookup value for this particluar file. .there is about 300 files i
need to update so i dont want to go in one by one and add a new cell
with the company id.


anyway to do a vlookup and have it search for a numerical value or
something like that?


anyhelp you can give would be greatly appreicated.


Thanks


mithu

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default how to extract only numbers

I don't know if this is what you are looking for but if the ID is in say H1,
you use the UDF:

Function NumberIt(CompanyCell As Range) As Double
C = CompanyCell.Value
For x = 1 To Len(C)
If IsNumeric(Mid(C, x, 1)) Then n = n & Mid(C, x, 1)
Next x
NumberIt = --n
End Function

in your VLOOKUP() like:

=VLOOKUP(NumberIt(H1),..........rest of vlookup formula


--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"mithu" wrote in message
oups.com...
Hello..
I am having trouble with extracting numbers from merged cells

i have a top row that has lets say for example


"Company XYX 23432 R & P analysis"


without the quotes.. is there anyway to extract the 23432 which is
the company id from this merged cell


I am doing this because i need to do a vlookup and the 23432 is the
lookup value for this particluar file. .there is about 300 files i
need to update so i dont want to go in one by one and add a new cell
with the company id.


anyway to do a vlookup and have it search for a numerical value or
something like that?


anyhelp you can give would be greatly appreicated.


Thanks


mithu




  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default how to extract only numbers

Try:

=LOOKUP(100^10,--MID(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&"01234567 89")),ROW(INDIRECT("1:"&LEN(A1)))))

"mithu" wrote:

Hello..
I am having trouble with extracting numbers from merged cells

i have a top row that has lets say for example


"Company XYX 23432 R & P analysis"


without the quotes.. is there anyway to extract the 23432 which is
the company id from this merged cell


I am doing this because i need to do a vlookup and the 23432 is the
lookup value for this particluar file. .there is about 300 files i
need to update so i dont want to go in one by one and add a new cell
with the company id.


anyway to do a vlookup and have it search for a numerical value or
something like that?


anyhelp you can give would be greatly appreicated.


Thanks


mithu


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default how to extract only numbers

On Mar 19, 10:35 am, Toppers
wrote:
Try:

=LOOKUP(100^10,--MID(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&"01234567 89")),RO*W(INDIRECT("1:"&LEN(A1)))))



"mithu" wrote:
Hello..
I am having trouble with extracting numbers from merged cells


i have a top row that has lets say for example


"Company XYX 23432 R & P analysis"


without the quotes.. is there anyway to extract the 23432 which is
the company id from this merged cell


I am doing this because i need to do a vlookup and the 23432 is the
lookup value for this particluar file. .there is about 300 files i
need to update so i dont want to go in one by one and add a new cell
with the company id.


anyway to do a vlookup and have it search for a numerical value or
something like that?


anyhelp you can give would be greatly appreicated.


Thanks


mithu- Hide quoted text -


- Show quoted text -


Thanks you guys are awesome that worked perfectly.


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
how to extract unique numbers once from a list of repeated numbers? [email protected] Excel Discussion (Misc queries) 2 May 2nd 06 04:17 PM
Extract numbers from cell with Text and Numbers wiredwrx New Users to Excel 3 April 18th 06 10:57 PM
How do I extract numbers from a cell with both text and numbers? SHANNON Excel Worksheet Functions 8 December 2nd 05 02:31 AM
extract numbers from cell containing text & numbers [email protected] Excel Worksheet Functions 1 November 14th 05 07:04 AM
Extract Fractional Numbers as Numbers NOT Date MrBill Excel Worksheet Functions 11 November 3rd 05 07:45 PM


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