Sum a range of columns depending on current month

excel-er-8

New Member
Joined
Jun 8, 2007
Messages
12
Office Version
  1. 2016
Platform
  1. Windows
Hi all,

I'm looking for a formula that will sum a range of columns based on current month. If current month is January, sum A2 thru L2. In Feb, sum B2 thru L2. In March, sum C2 thru L2. I'm hoping there is something other than a big nexted IF. Thanks!

1616091575083.png
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
How about
Excel Formula:
=SUM(INDEX(A2:L2,MONTH(TODAY())):L2)
 
Upvote 0
MrExcelPlayground.xlsm
ABCDEFGHIJKLM
1JanFebMarAprMayJunJulAugSepOctNovDecAnswer
2101520253035404550556065425
Sheet39
Cell Formulas
RangeFormula
M2M2=SUM(OFFSET(A2,0,MONTH(TODAY())-1,1,13-MONTH(TODAY())))
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,334
Messages
6,124,319
Members
449,154
Latest member
pollardxlsm

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