Solved

Set formula to find last row of data

Posted on 2013-06-14
2
563 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

910 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

22 Experts available now in Live!

Get 1:1 Help Now