Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have some table that in one column I have some strings (for example):
"Sum : 148,626.35 Better and different" "Sum : 193,500.00 Osem" I want only the number will be copy to another column. How do I do that -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Write this code in a module you insert to your workbook using VB Editor. Public Function texttrim(a As String) As Double Dim b As String For i = 1 To Len(a) If Asc(Mid(a, i, 1)) 43 And Asc(Mid(a, i, 1)) < 58 Then b = b + Mid(a, i, 1) Next texttrim = b End Function This will make a new worksheet function =texttrim() available in your workbook which does exactly what you need. For example if the text to be trimmed is in cell A1, enter =texttrim(A1) to any other cell and you will get just the number. Regards, -----Original Message----- I have some table that in one column I have some strings (for example): "Sum : 148,626.35 Better and different" "Sum : 193,500.00 Osem" I want only the number will be copy to another column. How do I do that ? --- Message posted from http://www.ExcelForum.com/ . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy and pasted numbers not acting like numbers | Excel Discussion (Misc queries) | |||
Copy and paste versus copy and insert copied cells | New Users to Excel | |||
sort numbers high to low, copy to new cells with associated data. | Excel Worksheet Functions | |||
copy numbers from numbers+text cell | Excel Worksheet Functions | |||
Copy/Paste how to avoid the copy of formula cells w/o calc values | Excel Discussion (Misc queries) |