+ Reply to Thread
Results 1 to 7 of 7

Calculate Variable Average With Slicer

  1. #1
    Forum Contributor
    Join Date
    04-16-2020
    Location
    Tehran, Iran
    MS-Off Ver
    2019 v2306
    Posts
    145

    Calculate Variable Average With Slicer

    Hello,
    I have 7 variable number, I need calculate average of numbers.
    as default sum 7 number and devide by 7
    sometimes I need ignore one number and sum 6 number and devide by 6
    sometimes I need ignore two number and sum 5 number and devide by 5
    position of numbers that I need to ignore them are variable or dynamic
    is it possible I do it with slicer?, I mean I need to filter or turn off ignore numbers

    could you please help me for do that?
    thank you in advance.
    Attached Files Attached Files
    Last edited by soubasa; 11-03-2022 at 03:30 PM.

  2. #2
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2308
    Posts
    1,474

    Re: Calculate Variable Average With Slicer

    Easiest way would be to use a helper column in column c. For every number you want include just put an x in column c.
    then just use an averageif() function.
    See attached workbook.
    Attached Files Attached Files
    <----- If you are happy with your solution please click on the "* Add Reputation" as a way to say thank you.

  3. #3
    Forum Contributor
    Join Date
    04-16-2020
    Location
    Tehran, Iran
    MS-Off Ver
    2019 v2306
    Posts
    145

    Re: Calculate Variable Average With Slicer

    Awesome
    Thank you very much
    when I want to ignore number, I have to delete it and type it again or back the change with CTRL + Z
    is it possible do it with slicer or something else for delete or hide ignore number? "hide number or delete it and comeback number again without type it or use of CTRL + Z"

  4. #4
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2308
    Posts
    1,474

    Re: Calculate Variable Average With Slicer

    to ignore number delete the x in the appropriate cell. To add it back you can just put an x in again. Of course CTRL+Z could work depending on if you did any actions inbetween.

  5. #5
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2308
    Posts
    1,474

    Re: Calculate Variable Average With Slicer

    actually another option is attached below.
    Turn your data into a pivottable. Then utilize an actual slicer. You can CTRL + CLICK to select or deselect multiples which will hide and autocalculate on the pivot for you.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    04-16-2020
    Location
    Tehran, Iran
    MS-Off Ver
    2019 v2306
    Posts
    145

    Re: Calculate Variable Average With Slicer

    Your the best



    Please Accept My Deepest Thanks

  7. #7
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2308
    Posts
    1,474

    Re: Calculate Variable Average With Slicer

    Glad to help and thank you for the rep

+ 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. Replies: 1
    Last Post: 04-23-2018, 09:43 AM
  2. Calculate average with variable
    By Blesbie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-31-2018, 03:50 AM
  3. [SOLVED] Calculate average of variable number of cells variable number of times
    By WeirnetherlandsBart in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-06-2014, 10:11 AM
  4. [SOLVED] Blank until at least 1 variable is entered, but stil calculate average
    By gocolonel77 in forum Excel General
    Replies: 3
    Last Post: 06-07-2013, 09:49 AM
  5. VBA: Calculate average based on data from previous column, variable length
    By zeno1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-01-2012, 07:26 PM
  6. Calculate average over variable range
    By Lukini in forum Excel General
    Replies: 2
    Last Post: 02-25-2011, 03:38 AM
  7. Calculate average over variable range
    By haan0054 in forum Excel General
    Replies: 2
    Last Post: 12-18-2009, 05:43 AM

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