+ Reply to Thread
Results 1 to 12 of 12

Calculation of different sets of cells depending on the content of a separate cell

  1. #1
    Registered User
    Join Date
    10-17-2022
    Location
    Leeds, England
    MS-Off Ver
    Microsoft 365 for Mac
    Posts
    6

    Question Calculation of different sets of cells depending on the content of a separate cell

    Hello everyone, thank you in advance for any help you can offer.

    I'm having a bit of trouble trying to figure this out. I have 4 separate sets of data (one for each quarter of the year) and a 5th set of data that acts as a 'year-to-date' summary of the previous 4. I need to somehow have the 'year-to-date' data combine the sum of the previous 4 quarters, depending on which quarter I specify in a different cell outside those sets of data.

    For example, if I specify '3' in a separate cell, I need the 'year-to-date' data to add quarters 1, 2, and 3 together, but ignore quarter 4, the same if I specify '2' which will add quarters 1 and 2 together but ignore 3 and 4.

    Is there a particular function/formula within Excel that can handle this, or is it held within a different method?

    Thank you,
    Steven
    Attached Files Attached Files
    Last edited by designSB; 10-17-2022 at 10:39 AM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,169

    Re: Calculation of different sets of cells depending on the content of a separate cell

    Please see yellow banner at top of the page on how to attach a sample workbook.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Registered User
    Join Date
    10-17-2022
    Location
    Leeds, England
    MS-Off Ver
    Microsoft 365 for Mac
    Posts
    6

    Re: Calculation of different sets of cells depending on the content of a separate cell

    Thank you John. I've put together a quick example of the quarters.

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,070

    Re: Calculation of different sets of cells depending on the content of a separate cell

    How about
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-17-2022
    Location
    Leeds, England
    MS-Off Ver
    Microsoft 365 for Mac
    Posts
    6

    Re: Calculation of different sets of cells depending on the content of a separate cell

    That's perfect, thank you Fluff.

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,070

    Re: Calculation of different sets of cells depending on the content of a separate cell

    Glad to help & thanks for the feedback.

  7. #7
    Registered User
    Join Date
    10-17-2022
    Location
    Leeds, England
    MS-Off Ver
    Microsoft 365 for Mac
    Posts
    6

    Re: Calculation of different sets of cells depending on the content of a separate cell

    Hello again Fluff. How would I go about amending that formula to use cells that aren't next to each other? I need to adapt this same formula but there are some cells in-between that aren't a part of the calculation.

    I tried selecting the cells (F9,M9,T9,AA9) but was presented with the 'too many arguments' error; I don't see any rogue commas, brackets, etc. I've attached a screenshot of the formula (cell references are different from what you sent as this is in my proper document).

    Attachment 800968

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,070

    Re: Calculation of different sets of cells depending on the content of a separate cell

    Can you please upload a more realistic workbook.

  9. #9
    Registered User
    Join Date
    10-17-2022
    Location
    Leeds, England
    MS-Off Ver
    Microsoft 365 for Mac
    Posts
    6

    Re: Calculation of different sets of cells depending on the content of a separate cell

    I've attached a test document which is what I'm working with. I need the YTD green column to perform the above formula across the green columns from each Quarter. Please let me know if you have any other questions about how it works.

    Thanks again.

  10. #10
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,070

    Re: Calculation of different sets of cells depending on the content of a separate cell

    Ok, how about
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    10-17-2022
    Location
    Leeds, England
    MS-Off Ver
    Microsoft 365 for Mac
    Posts
    6

    Re: Calculation of different sets of cells depending on the content of a separate cell

    Brilliant again, cheers Fluff.

  12. #12
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,070

    Re: Calculation of different sets of cells depending on the content of a separate cell

    Glad to help & thanks for the feedback.

+ 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] Dynamically update cells depending on content of adjacent cell
    By markmcm2021 in forum Office 365
    Replies: 3
    Last Post: 08-10-2022, 05:21 AM
  2. Replies: 6
    Last Post: 03-21-2022, 09:14 PM
  3. Conditional formatting: highlight sets of cells depending on content
    By neuroredvio in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-14-2018, 08:47 PM
  4. Cells & tables formats depending on another cell content
    By ThomassoCZ in forum Excel General
    Replies: 1
    Last Post: 12-17-2014, 10:56 AM
  5. [SOLVED] Fomatting cells (background colour)depending on content of another cell
    By Apache_sim in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-04-2013, 07:58 AM
  6. Deleting cells depending on content of another cell
    By drgogo in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-18-2008, 10:16 PM
  7. Resolved >>> Separate One Cell content to Many Cells
    By Prem in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 10-23-2007, 04:09 PM

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