View Single Post
  #3  
Old May 21st, 2010, 06:16 PM posted to microsoft.public.excel.worksheet.functions
Luke M[_4_]
external usenet poster
 
Posts: 451
Default How to retain part of formula's criteria as static

You would insert the "$" before things you don't want to change.

=SUMPRODUCT(--(MONTH(Data!A$50:A$10046)=7),--(YEAR(Data!A$50:A$10046)=2008))

Or perhaps, the more flexible formula:
=SUMPRODUCT(--(TEXT(Data!A$50:A$10046,"mmyyyy")="072008"))
This way you have fewer calculations, and formula won't crash if a
non-numerical value is in the range A50:A10046.
--
Best Regards,

Luke M
"--Viewpoint" wrote in message
...
Below is a formula that I want A50:A100046 to remain static so when I
"fill
down" the information doesn't change.

=SUMPRODUCT(--(MONTH(Data!A50:A10046)=7),--(YEAR(Data!A50:A10046)=2008))

Can you suggest how I can write the formula to accomplish my goal? (Just
an
FYI: I'm basing the month and year on a fiscal year beginning July 1
through
June 30, so I'm manually changing this info.)