Return a cell reference as a result of an IF formula

  • Thread starter Thread starter Larry G
  • Start date Start date
L

Larry G

I am using an IF logical. If the result is true, I would like to return the
SUM of a range or cells. Or at the very least return cell reference. eg
=IF(K3<=DATE(2010,1,31),AND(K3>=DATE(2010,1,1))) Since this is a true
statement, I would like it to return the SUM of A1:A10

Thank you.
 
=if(and(date(2010,1,1)<=k3,k3<=date(2010,1,31)),sum(a1:a10),"whateveryouwant")

Because you're using the complete month, you have other choices, too:

=if(text(k3,"yyyymm")="201001",sum(a1:a10),"not in Jan 2010")

=if(and(month(k3)=1,year(k3)=2010),sum(a1:a10"),"anything else?")
 
Back
Top