Put year in Sumproduct range name

Dave5280

New Member
Joined
Aug 26, 2019
Messages
10
I want to read the year out of a date column, and put the year in with a range name in a sumproduct formula. Example, date column entry 2/1/2021, and =Sumproduct(2021RangeName,a1:c1). So I need the Year function to pull out the year and I have the rest of the range name to concatenate it with, but I can't get the formula to be active and it errors out. If I manually put the range name in the formula it does work. I have tried various combinations of Text function with single and double quotes and can't get it to work.

Thank you for any ideas!

- Dave
 

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.
2021RangeName is not a valid name, it must start with a letter or an underscore.
 
Upvote 0
Thi sworks:=SUMPRODUCT(INDIRECT("RangeName"&YEAR(A4)),A1:C1)
 
Upvote 0
Ok how about
Excel Formula:
=SUMPRODUCT(INDIRECT("Rangename"&YEAR(A2)),A1:C1)
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,936
Messages
6,122,340
Members
449,079
Latest member
rocketslinger

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