View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Formula Question

This example presumes that col AB in PC-01 will dictate the extent:
=SUMPRODUCT((TEXT(OFFSET('PC-01'!$O$2,,,COUNT('PC-01'!AB:AB)),"mmmyy")=TEXT($A11,"mmmyy"))*OFFSET('P C-01'!$AB$2,,,COUNT('PC-01'!AB:AB)))

Col AB is presumed to contain a non-numeric header in AB1 (or a blank AB1)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:16,200 Files:354 Subscribers:53
xdemechanik
---
"Secret Squirrel" wrote:
I have a summary worksheet that totals up some values on one of my other
worksheets. The problem is that I have to keep changing the range of my
formula because the data on my other worksheet changes daily and more rows
are always added. How can I set up my formula to automatically go to the last
row it finds data in on my other worksheet?


Here's an example of my formula:

=SUMPRODUCT(--(MONTH('PC-01'!$O$2:$O$20000)=MONTH($A11)),--(YEAR('PC-01'!$O$2:$O$20000)=YEAR($A11)),'PC-01'!$AB$2:$AB$20000)

As you can see it's set up from O2 to O20000. I keep having to change the
O20000 since new data is always added. Is there an easy way to automate this?