Solved

Set formula to find last row of data

Posted on 2013-06-14
2
553 Views
Last Modified: 2013-06-15
I have a formula that I need to keep changing as I add rows of data. How can I change this formula to always adjust itself to finding the last row of data when I add new rows? I read something about using the OFFSET function but not sure how to use it.

SUMPRODUCT(--(Database!$H$4:$H$35020=$A$10),--(YEAR(Database!$C$4:$C$35020)=YEAR(C$18)),--(MONTH(Database!$C$4:$C$35020)=MONTH(C$18)),--(Database!$AP$4:$AP$35020=$B19),(Database!$V$4:$V$35020))

Open in new window

0
Comment
Question by:Lawrence Salvucci
2 Comments
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 39249684
If you have Excel 2007 or later I'd advise you to use SUMIFS which is faster. With that function you can just reference the whole columns with no significant downside, i.e.

=SUMIFS(Database!$V:$V,Database!$H:$H$,$A$10,Database!$AP:$AP,$B19,Database!$C:$C,">="&EOMONTH(C$18,-1)+1,Database!$C:$C,"<"&EOMONTH(C$18,0)+1)

If you really want to continue with the current formula then try looking at "dynamic named ranges", see here

regards, barry
0
 
LVL 1

Author Closing Comment

by:Lawrence Salvucci
ID: 39250039
Thanks Barry. I like your approach better.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now