How do I change my sum formula based on the value in another cell?

gkisystems

Board Regular
Joined
Apr 20, 2012
Messages
76
I'm trying to create a formula the totals up my year to date (YTD) numbers.


In cell DK10, I have the date. In this case, it is 7/1/2013 displayed as "Jul-13." In cell DL14, I have =SUM(CW14:DC14) which adds up the monthly number for January, Feb, March, and so on through July.


What I'm trying to do is get the "DC" in =SUM(CW14:DC14) to change by itself by updating the value in cell DK10. For example, next month cell DK10 will be "Aug-13," so I want this formula =SUM(CW14:DC14) to change to be =SUM(CW14:DD14).


How do I do it? I'm thinking maybe the use of =Indirect(something), but I'm not really sure. Any help would be appreciated.


I'm not really looking to make this any more complicated than it has to be, so I'd prefer using a formula (if possible) over a macro/vba.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Have you tried a sumifs formula instead? put 1/1/xxxx in DK9 and the date you want to go to in DK10 and do a less than or equal to and great than or equal to.
 
Upvote 0
Have you tried a sumifs formula instead? put 1/1/xxxx in DK9 and the date you want to go to in DK10 and do a less than or equal to and great than or equal to.

Absolutely amazing! I knew had to be something simple, thank you! Here is the formula I used that ended up working:


=SUMIF($CW$11:$DH$11,"<="&$DK$10,$CW14:$DH14)
 
Upvote 0

Forum statistics

Threads
1,215,264
Messages
6,123,960
Members
449,135
Latest member
jcschafer209

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top