Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub rework()
Dim ans As Variant Dim ans2 As Variant Dim var As Variant ans = InputBox("Which advisor do you wish to use?") ans2 = InputBox("Which payment method do you wish to use?") var = WorksheetFunction.SumProduct(--(Range("A1:A10000") = ans), --(Range("H1:H10000") = ans2)) MsgBox (var & " cases match your criteria.") End Sub I'm trying to work out how to use WorksheetFunction so I can make some macro's that can calculate data without having to enter the formulas into the spreadsheet. I tried off with .Index and got that to work quite easily, but ..SumProduct would be the most useful for me but i'm unsure how to make them different to than if I was typing the formula into a cell... |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
WorksheetFunction help | Excel Discussion (Misc queries) | |||
Can't use WorksheetFunction | Excel Discussion (Misc queries) | |||
WorkSheetFunction.CountIf & WorkSheetFunction.SumIf with 2 conditions? | Excel Programming | |||
WorksheetFunction | Excel Programming | |||
WorksheetFunction | Excel Programming |