Select multiple cells to perform product

Marcrg

New Member
Joined
Oct 26, 2022
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hello



Help!



Is there a formula/function that will enable me to find the product of all the values between two of the dates. for example, in the table below I may need it for from 2020 to 2022 so I'll need a formula that will give me 108.6*109.4*117.1.



DateValue
01/03/2022117.1
01/03/2021109.4
01/03/2020108.6
01/03/2019107
01/03/2018105
01/03/2017102.5
01/03/2016100.2
01/03/201599.7
01/03/201499.7
01/03/201398.1
01/03/201295.4


I effectively need something where I can tell it the two dates, and it will give me the product of all the values between those two dates. I thought it would be as easy as using the CELL function to get the cell names into the PRODUCT function but I can't seem to get that to work



Sorry if I'm not making this clear - any help will be greatly appreciated!



Thanks!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hi & welcome to MrExcel.
How about
Fluff.xlsm
ABCDEF
1DateValue
201/03/2022117.120201391246
301/03/2021109.42022
401/03/2020108.6
501/03/2019107
601/03/2018105
701/03/2017102.5
801/03/2016100.2
901/03/201599.7
1001/03/201499.7
1101/03/201398.1
1201/03/201295.4
13
Code
Cell Formulas
RangeFormula
F2F2=PRODUCT(FILTER(B2:B12,(YEAR(A2:A12)>=E2)*(YEAR(A2:A12)<=E3)))
 
Upvote 0
Excel Formula:
=SUMPRODUCT(--(YEAR(A2:A12)>=2020)*--(YEAR(A2:A12)<=2022),B2:B12)
 
Upvote 0
Hi,

Thanks both for looking at it for me.

The SUMPRODUCT formula does indeed give the sum - but I can't get Fluff's PRODUCT formula to work, it gives me the #CALC! error. Is my version of excel missing something?

Thanks!
 
Upvote 0
#calc suggests that the filter didn't find anything.
If you select the column with the dates & change the format to General, do you still see dates or numbers
 
Upvote 0
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Select multiple cells to perform product
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
#calc suggests that the filter didn't find anything.
If you select the column with the dates & change the format to General, do you still see dates or numbers
I see numbers
 
Upvote 0
Ok, that's fine. Can you post some sample data, including the formula.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Select multiple cells to perform product
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
Apologies
 
Upvote 0

Forum statistics

Threads
1,215,234
Messages
6,123,776
Members
449,123
Latest member
StorageQueen24

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