Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ams Ams is offline
external usenet poster
 
Posts: 24
Default Numeric data

Dear all

Pleasae guide me to find out numeric data in cell where the cell
contains both aplha & numeric value.

Like i want to take out pincode from one single cell where in the
location and pincode is mentioned in a single cell

Eg ( Mumbai 400018 )

Serch Result shud b 400018


Thanxs in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Numeric data

Are pin codes always 6 digits long? If so...

=MID(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&"0123456 789")),6)

If not, you will have to give us several examples so we can see if any
patterns exist (for example, number always at the end of the text, or number
is always followed by a space, and so on). By the way, it is not clear from
your example if your text is surrounded by parentheses or not.

Rick


"Ams" wrote in message
...
Dear all

Pleasae guide me to find out numeric data in cell where the cell
contains both aplha & numeric value.

Like i want to take out pincode from one single cell where in the
location and pincode is mentioned in a single cell

Eg ( Mumbai 400018 )

Serch Result shud b 400018


Thanxs in advance


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Numeric data

On 9 May, 10:11, Ams wrote:
Pleasae guide me to find out numeric data in cell where the cell
contains both aplha & numeric value.


Sounds like a job for the Split function

Function GetNumeric(S as string)
Dim i as Integer
Dim Lumps as Variant
Lumps = Split(S," ") ' or delimiter of your choice, but your example
used a space
For i = 0 to Ubound Lumps
If Isnumeric(Lumps(i)) then ' found a number
GetNumeric = Val(Lumps(i))
Exit Function
End If
Next
' If we get here, there wasn't one
GetNumeric = "<Invalid Data"
End Function
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
numeric data with restriction of data length kHuRRum HumaYun Excel Discussion (Misc queries) 3 August 9th 07 04:53 PM
Find and Return Numeric Label based on (Numeric Value) Criterion Sam via OfficeKB.com Excel Worksheet Functions 2 September 18th 06 11:20 PM
Numeric in Text to convert back to the form of Numeric for VLookup Purposes achilles Excel Discussion (Misc queries) 4 February 6th 06 07:05 AM
Match Single Numeric Criteria and Return Multiple Numeric Labels Sam via OfficeKB.com Excel Worksheet Functions 3 December 30th 05 08:01 PM
Match Single Numeric Criteria and Return Multiple Numeric Labels Sam via OfficeKB.com Excel Worksheet Functions 0 December 29th 05 08:44 PM


All times are GMT +1. The time now is 09:48 PM.

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"