Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Capture a number from a cell containing numbers and letters
Hi all,
I need to capture the number from a cell that contains data in the format "2.45 Days" or "3.6 Days". Is it possible to somehow remove the "Days" elements and capture all else? I am doing this programatically using VBA. Thank you kindly Khurram |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Capture a number from a cell containing numbers and letters
On 23 Jan 2007 10:04:20 -0800, "Khurram" wrote:
Hi all, I need to capture the number from a cell that contains data in the format "2.45 Days" or "3.6 Days". Is it possible to somehow remove the "Days" elements and capture all else? I am doing this programatically using VBA. Thank you kindly Khurram So long as the format is as you show, with the numeric value coming first, the Val function will return only the number: e.g. Debug.Print Val("3.6 days") -- 3.6 --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
custom number format code using letters and numbers | Excel Worksheet Functions | |||
How can I sum just numbers in a cell using letters or others symbo | Excel Worksheet Functions | |||
How to extract numbers from letters in cell? | Excel Discussion (Misc queries) | |||
Expanding numbers and letters in a cell | Excel Discussion (Misc queries) | |||
Capture first 2 letters from a product code | Excel Worksheet Functions |