Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a problem creating a function like this:
MySUMIF(range1, condition2range1, range2, condition2range2, sumRange) As Double Because I have data like this: A B C 1 Tree Owner Profit 2 Apple Shawn 5.325611365 3 Pear Edward 8.325687876 4 Cherry John 25.69556655 5 Apple John 2.565678955 6 Apple John 63.59654647 7 Pear Edward 5.996465456 8 Pear Shawn 3.567898 but i need to call this function on another sheet, example =MySUMIF(Sheet1!$A$2:$A$8, "Apple", Sheet1! B$2:$B$8, "John", Sheet1!C$2:C$8) I know this function is really easy but how can I use the three ranges at the same time to get the sum and make the respective comparisons. I try using three diferent "for" statements but It makes my algorithm O(n)^3, what I need - I think - is how to use the three ranges in one "for" statement For Each rng,rgn2,rgn3 in myRange1, myRange2, myRange3 .... Next rng I have been tring to use the Offset property but I seems no work to me. If anyone knows how can I have every value on the respective range. PLEASE HELPME. Thanks In Advace. czamora. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Join non-contiguous ranges into one range via named range? | Excel Discussion (Misc queries) | |||
x y scatter chart series ranges reset to x(range) = y(range) | Charts and Charting in Excel | |||
Charting only Used Range with Named Ranges | Charts and Charting in Excel | |||
How to replicate 1 range to muptiple ranges at once? | Excel Worksheet Functions | |||
Assigning ranges for values (e.g., $1,005 the range is ">$1K to 5K | Excel Worksheet Functions |