Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am getting the data in the form of 2/5, 10/18, 5/8 etc.
I need to sum the figures to the left of "/" (slash)and right of "/" (slash) To acheive this I am creating two UDF for left and right each. So far I have this : Function slsum(kk) As Range Dim mysum mysum = 0 For Each cell In kk '=+LEFT(A2,FIND("/",A2)-1) ----This formula works when entered in cell pp = WorksheetFunction.Sum(Left(kk, WorksheetFunction.Find("/", kk) - 1))'*ERROR LINE* mysum = mysum + pp Next slsum = mysum End Function The error line marked above gives me error of type mismatch. If I give range as single cell, last line slsum=mysum gives error of "Object variable or with block variable not set" Request for solution please. Regards, Manakmala. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Colon at the end of excel file name(ex: problem.xls:1, problem.xls | New Users to Excel | |||
Started out as an Access problem. Now an Excel problem | Excel Discussion (Misc queries) | |||
problem with a conditional max problem | Excel Discussion (Misc queries) | |||
Problem when multipple users access shared xl-file at the same time, macrocode for solve this problem? | Excel Programming |