Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I wouldl use Sumproduct instead of SUM so yo don't have to worry about an array formula. If would use Evaluate to get the results into VBA. I used format to get the dates entered in the combobox in the same format as the worksheet. Results = Evaluate("Sumproduct(($A:$A=StartDate)*($A:$A<=En dDate)*($B:$B=Employee))") You need to use variable in the above method so do this StartDate = combobox1.text StartDate = format(DateValue(StartDate,"MM/DD/YY")) EndDateDate = combobox2.text EndDate = format(DateValue(EndDate,"MM/DD/YY")) Employee = Combobox3.text Results = Evaluate("Sumproduct(($A:$A=" & StartDate & ")*($A:$A<=" & _ EndDate & ")*($B:$B=" & Employee & "))") msgbox(Results) -- joel ------------------------------------------------------------------------ joel's Profile: http://www.thecodecage.com/forumz/member.php?u=229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=195353 http://www.thecodecage.com/forumz |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Age computation | Excel Programming | |||
percentage computation | Excel Discussion (Misc queries) | |||
Date Computation | Excel Programming | |||
computation error | Excel Discussion (Misc queries) | |||
Rew Macro For Computation | Excel Programming |