Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
"Rick Rothstein" wrote...
Assuming Harlan's guess is correct (your cells could contain a string like 1 2 4 17 -5 2 0 -7 23 which you want to total up to get 37 as the answer)... if you are able to use VB code . . . .... If security isn't an issue, and the OP is (and/or his/her users are) running Excel 2002 or later versions, then the OP could just use a defined name calling an XLM function. If the string of numeric substrings were in cell C5 and the sum of those substrings were supposed to be in cell D5, with cell D5 the active cell, define the name SUMNSS as the formula =EVAL(SUBSTITUTE(TRIM(C5)," ","+")) then enter the formula =SUMNSS in cell D5. This particular approach won't trigger macro security warnings when opening the workbook. If you're going to use VBA udfs, better to make the udfs general rather than overly particular. In this case, a simple VBA wrapper around the Excel OM's Evaluate would be the better approach. Function evaludf(s As String): evaludf = Evaluate(s): End Function Then try the formula =evaludf(SUBSTITUTE(TRIM(C5)," ","+")) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Selecting specific numbers from a cell containing multiple numbers | Excel Worksheet Functions | |||
Help! How do you get excel to find the x(changes daily, marked in a cell from another formula) highest numbers in a group of numbers and sum them up? | Excel Worksheet Functions | |||
can a single cell contain multiple numbers? | Excel Worksheet Functions | |||
Can you add multiple numbers in the same cell%3f | Excel Worksheet Functions | |||
Counting multiple numbers in one cell | Excel Worksheet Functions |