ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   sumif from activeX control (https://www.excelbanter.com/excel-worksheet-functions/80772-sumif-activex-control.html)

CraigSA

sumif from activeX control
 
I am trying to set up spreadsheet where I can select a range, by date, from a
couple DTPicker activeX controls, and then sum up some values corresponding
to that date range selected in the DTPicker's from a list of dates from
another spreadsheet. I am struggling at the moment though with the SUMIF
function. As far as I can tell the SUMIF only accepts actual values in the
criteria entry, so I can't even read a value from a cell. I want to say
sumif(*my listed dates*,*my selected date range in DTPicker's*, *range of
corresponding values to sum*) but whenever I try to say, for instance E12 in
the criteria, it doesn't read cell e12's value, it takes the value as the
letter e. I'm not sure how to read value's from the DTPicker but I haven't
even tried yet because I can't even read in a cell's value.

Please help

chillihawk

sumif from activeX control
 
=sumif("A1:A5",""&E12,"B1:B5")

is the answer to the first part

however if you are attempting to set an upper and lower bound on the
date range (ie 2 sumif criteria) you'll need something like the
following array formula:

{=sum(if(A1:A5E12,1,0)*if(A1:A5<E11,1,0)*B1:B5)}

HTH



All times are GMT +1. The time now is 10:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com