+ Reply to Thread
Results 1 to 12 of 12

Select multiple cells to perform product

  1. #1
    Registered User
    Join Date
    10-26-2022
    Location
    England
    MS-Off Ver
    365
    Posts
    5

    Select multiple cells to perform product

    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.

    Date Value
    01/03/2022 117.1
    01/03/2021 109.4
    01/03/2020 108.6
    01/03/2019 107
    01/03/2018 105
    01/03/2017 102.5
    01/03/2016 100.2
    01/03/2015 99.7
    01/03/2014 99.7
    01/03/2013 98.1
    01/03/2012 95.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!

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,014

    Re: Select multiple cells to perform product

    Welcome to the forum.

    Next time, please provide a sample workbook.

    Try this:

    =SUMPRODUCT(($A$1:$A$11>=DATE(2020,1,1))*($A$1:$A$11<=DATE(2022,12,31))*$B$1:$B$11)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,014

    Re: Select multiple cells to perform product

    Or use SUMIFS:

    =SUMIFS($B$1:$B$11,$A$1:$A$11,">="&DATE(2020,1,1),$A$1:$A$11,"<="&DATE(2022,12,31))

    Any good?

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,014

    Re: Select multiple cells to perform product

    Seen, but no response ...

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  5. #5
    Registered User
    Join Date
    10-26-2022
    Location
    England
    MS-Off Ver
    365
    Posts
    5

    Re: Select multiple cells to perform product

    Hi,

    Thanks for looking at that for me.

    Both of those give me the sum of the values rather than the product. It is picking up the values I want though.

    Thanks

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,014

    Re: Select multiple cells to perform product

    There are instructions at the top of the page explaining how to attach your sample workbook. Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,014

    Re: Select multiple cells to perform product

    Administrative Note:

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not told us about this. You are required to do so.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important: https://excelguru.ca/a-message-to-forum-cross-posters/

    (Note: this requirement is not optional. As you are new here, I shall do it for you this time: https://www.mrexcel.com/board/thread...oduct.1220350/)

  8. #8
    Registered User
    Join Date
    10-26-2022
    Location
    England
    MS-Off Ver
    365
    Posts
    5

    Re: Select multiple cells to perform product

    Example workbook.xlsx

    Sorry! Hopefully that's worked

  9. #9
    Registered User
    Join Date
    10-26-2022
    Location
    England
    MS-Off Ver
    365
    Posts
    5

    Re: Select multiple cells to perform product

    Hi,

    Someone on another forum gave me this which seems to do the trick.

    =PRODUCT(IF((YEAR(A2:A12)>=2020)*(YEAR(A2:A12)<=2022),B2:B12))

    Thank you though

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,014

    Re: Select multiple cells to perform product

    Have you read post #7 and do you understand it?

    Please make sure you read through our rules (to which you agreed on joining) before you next post here. Thanks.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  11. #11
    Registered User
    Join Date
    10-26-2022
    Location
    England
    MS-Off Ver
    365
    Posts
    5

    Re: Select multiple cells to perform product

    Sorry - I was told off for this on the other forum too. Won't happen again.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,014

    Re: Select multiple cells to perform product

    Please mark as solved, etc. as explained in post #10.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] how to select cells above active cell and do a sum product with other row in VBA
    By Raja10 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-12-2020, 10:03 PM
  2. Replies: 1
    Last Post: 07-10-2016, 11:30 AM
  3. [SOLVED] Help With VBA Macro to select cells with certain value and perform action on adjacent cell
    By MSDemocrat in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-10-2014, 03:34 PM
  4. Select Multiple workbooks at once to perform an action
    By rshnkmr39 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-03-2013, 06:09 AM
  5. Select Multiple workbooks at once to perform an action
    By rshnkmr39 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-03-2013, 05:23 AM
  6. [SOLVED] Select multiple independent cells and perform a calculation
    By mtsykes28 in forum Excel General
    Replies: 18
    Last Post: 07-06-2012, 06:38 AM
  7. [SOLVED] how to select specific cells to product a chart
    By knuuttila in forum Excel General
    Replies: 2
    Last Post: 08-14-2005, 06:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1