+ Reply to Thread
Results 1 to 9 of 9

Associating different text cells to one text cell to calculate cost average

  1. #1
    Registered User
    Join Date
    06-01-2022
    Location
    Seoul, South Korea
    MS-Off Ver
    Microsoft 365 MSO (Version 2203 Build 16.0.15028.20242) 64-bit
    Posts
    4

    Associating different text cells to one text cell to calculate cost average

    Hi,

    i am struggling to figure out an Excel formula that allows me to group different text cells into one in order to calculate a grouped average.
    In the attached file i have a table that shows Sales by Item and by Quarter.
    The second, smaller table below needs to apply a formula that can calculate the average Sales for a group e.g. Toys, differentiated by the colors Orange and Green.

    Whereas i can just calculate the average by choosing the Sales cells under each group, I hoped someone can help me figure out a more advanced formula by using 'averageifs' by ignoring 0 sales in conjunction to associating e.g. text cells Lego, Barbie,Games, Cards to the group name 'Toys'.
    Thank you!

    Attachment 782463
    Attached Files Attached Files
    Last edited by Fruffball; 06-01-2022 at 05:17 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Associating different text cells to one text cell to calculate cost average

    There are instructions at the top of the page on how to post a sample sheet.Thanks
    Your profile states XL 2203? Is this a new version?

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

    Re: Associating different text cells to one text cell to calculate cost average

    Administrative Note:

    Welcome to the forum.

    Members will tailor the solutions they offer to the version (NOT a release number like 2203) of Office (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this. Thanks.
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

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

    Re: Associating different text cells to one text cell to calculate cost average

    You cannot sum by cell colour with a formula. You will need to set up a lookup list somewhere in the workbook to categorise the individual items, and then reference this in the formula.

    As already requested, please provide a sample workbook.

  5. #5
    Registered User
    Join Date
    06-01-2022
    Location
    Seoul, South Korea
    MS-Off Ver
    Microsoft 365 MSO (Version 2203 Build 16.0.15028.20242) 64-bit
    Posts
    4

    Re: Associating different text cells to one text cell to calculate cost average

    Thank you for all the comments and my apology as i am new to this and still learning. I have updated my version in my profile based on what i see on the program: Microsoft 365 MSO (Version 2203 Build 16.0.15028.20242) 64-bit. I also attached a file where i calculated average by selecting each relevant cell and using an automated formula that calculates averages by item. Yet, i tried to find a formula that helps me to associate different items to the group name item but i am not able to.

  6. #6
    Registered User
    Join Date
    06-01-2022
    Location
    Seoul, South Korea
    MS-Off Ver
    Microsoft 365 MSO (Version 2203 Build 16.0.15028.20242) 64-bit
    Posts
    4

    Re: Associating different text cells to one text cell to calculate cost average

    Thank you Ali, I corrected my version in the profile and attached a workbook.
    Last edited by Fruffball; 06-01-2022 at 05:29 AM.

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

    Re: Associating different text cells to one text cell to calculate cost average

    Try this:

    =SUM(SUMIF($B$2:$B$25,$A$31:$A$34,$C$2:$C$25))/SUM(COUNTIFS($B$2:$B$25,$A$31:$A$34,$C$2:$C$25,"<>"))

    and this:

    =SUM(SUMIF($B$2:$B$25,$A$35:$A$38,$C$2:$C$25))/SUM(COUNTIFS($B$2:$B$25,$A$35:$A$38,$C$2:$C$25,"<>"))
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    06-01-2022
    Location
    Seoul, South Korea
    MS-Off Ver
    Microsoft 365 MSO (Version 2203 Build 16.0.15028.20242) 64-bit
    Posts
    4

    Re: Associating different text cells to one text cell to calculate cost average

    Thank you so much, Ali. I tried it on my original data file but unfortunately it returns an Error stating 'Function divide parameter 2 cannot be 0'. To be frank, i dont quite know what that means.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,268

    Re: Associating different text cells to one text cell to calculate cost average

    Nor do I - sorry.

    If you can provide a sample workbook showing the issue, I'll take a look. This is NOT an error message that I have ever seen on Excel!

+ 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] Ratios and percentages to calculate average cost
    By CaptainMCH in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-28-2021, 12:43 PM
  2. Calculate average when some cells contain text
    By 4sp1r3 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-30-2020, 09:02 AM
  3. Replies: 43
    Last Post: 08-28-2019, 07:26 AM
  4. Associating Text in a List a Value
    By solwinds in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-29-2016, 06:46 AM
  5. Associating specific text in a cell to return values from a table
    By reddragonbc in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-05-2016, 05:40 AM
  6. Replies: 7
    Last Post: 12-05-2011, 11:51 PM
  7. Associating images with random text
    By shelbyrush in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-06-2011, 12:56 PM

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