Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Well, if it helps, this exactly what I have going on:
Data set: Columns A & B; Product Inventory Location <=Header PrdA LocA PrdA LocA PrdB LocA PrdC LocA PrdB LocA PrdA LocA PrdB LocB PrdB LocB PrdC LocB PrdC LocB Columns E & F; Prods Locs <=Header PrdA LocA PrdB LocA PrdC LocA PrdA LocB PrdB LocB PrdC LocB Macro: Sub sumprod_test() Dim rng1 As Range, rng2 As Range, cell As Range Dim cnt As Long Set rng1 = Range("A2:A12") Set rng2 = Range("B2:B12") For Each cell In Range("E2:E7") cnt = Application.Evaluate("Sumproduct(--(" & _ rng1.Address(0, 0, xlA1, True) & " = """ & cell.Address & "),--(" & _ rng2.Address(0, 0, xlA1, True) & "=" & cell.Offset(0, 1).Address & ")") cell.Offset(0, 2).Value = cnt Next End Sub Produces "Type Mismatch" when it gets to cnt=. When I float the mouse pointer over the .Addresses I get valid ranges and cell locations, but cnt = 0. I keep hoping one of these I will understand what I'm seeing and doing. Bill |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sumif for multi conditions. i.e sumif(A1:A10,"Jon" and B1:B10,"A" | Excel Worksheet Functions | |||
Embedding a Sumif in a sumif | Excel Worksheet Functions | |||
SUMIF | New Users to Excel | |||
nested sumif or sumif with two criteria | Excel Worksheet Functions | |||
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function | Excel Worksheet Functions |