Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

need moving tally



in the attached file in the AMORT tab cell J17 has a total for 2 columns


my issue is I want it to only add the total for columns H and I up to where column C (date) is <= Cell D5 (today's date)



Selected Answer

Hi again WlideCoyote

Instead of 


use the SUMIF function as follows:

=SUMIF(C26:C762,"<=" & $D$5,H26:H762)+SUMIF(C26:C762,"<=" & $D$5, I26:I762)

(please check it works correctly- I don't have time!). It relies on D5 containing today's date (as it does in your file)..

You can find out about SUMIF (and related more powerful SUMIFS and COUNTIF/ COUNTIFS) in the tutorials secion, specifically here SUMIF - Sum Values Based on Criteria in Excel

Hope this fixes things for you. If so, please remember to mark this Answer as Selected.



Thanks again John.
It appears to be working at this stage. will check late this week again to confirm
wildecoyote1966 (rep: 30) Mar 31, '24 at 8:03 am
Good, it should work. Thanks for selecting my Answer WileCoyote. 
John_Ru (rep: 6142) Mar 31, '24 at 2:44 pm
I used it in my homeloan as well and both are correct
wildecoyote1966 (rep: 30) Apr 1, '24 at 12:41 am
John_Ru (rep: 6142) Apr 1, '24 at 3:07 am
Add to Discussion

Answer the Question

You must create an account to use the forum. Create an Account or Login