Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Text string to a number

The following function returns a text..but i want to get it as a number:

Public Function Gmid(vin)
If Mid(vin, 12, 1) < "A" And Mid(vin, 12, 1) 0 Then
ID = Right(vin, 6)
Else
ID = Right(vin, 5)
End If
Gmid = ID
End Function

Thanks in advance x your help!

AhsMorK (chile)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Text string to a number

Public Function Gmid(vin) As Long
__________________________________________________ _____________________

"AshMorK" wrote in message
...
The following function returns a text..but i want to get it as a number:

Public Function Gmid(vin)
If Mid(vin, 12, 1) < "A" And Mid(vin, 12, 1) 0 Then
ID = Right(vin, 6)
Else
ID = Right(vin, 5)
End If
Gmid = ID
End Function

Thanks in advance x your help!

AhsMorK (chile)



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
Converting a text word or text string to a number Tom Excel Discussion (Misc queries) 6 January 2nd 09 08:23 PM
Change 3 letter text string to a number string Pete Excel Discussion (Misc queries) 3 December 31st 07 07:47 PM
Extract number from text/number string.. nastech Excel Discussion (Misc queries) 5 July 5th 06 11:21 PM
Splitting a text string into string and number mcambrose Excel Discussion (Misc queries) 4 February 21st 06 03:47 PM
How do I look up a number within a string of text Rich Hayes Excel Worksheet Functions 3 October 14th 05 05:49 PM


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