How to formulate Dynamic Excel RangesHow to create Excel (.XLS and .XLSX) file in C# without installing Ms Office?How do I properly clean up Excel interop objects?Import and Export Excel - What is the best library?Excel: Find the minimal value in a columnNegative values and postive values in excelHow to find two difference number values between A1 and B1 less than or equal to 10 value in Excelhow to populate an excel cell using multiple =IF functionExcel formula for greater than but less than with several tiersExcel doesn't calculate simple arithmetic operations correctlyCustom Filter in Excel Interop using c#

What does i386 mean on macOS Mojave?

We are two immediate neighbors who forged our own powers to form concatenated relationship. Who are we?

Limit of an integral vs Limit of the integrand

Renting a house to a graduate student in my department

Why was the Ancient One so hesitant to teach Dr. Strange the art of sorcery?

Is there a need for better software for writers?

Pre-1993 comic in which Wolverine's claws were turned to rubber?

Will change of address affect direct deposit?

Washer drain pipe overflow

Is there a faster way to calculate Abs[z]^2 numerically?

Does Lawful Interception of 4G / the proposed 5G provide a back door for hackers as well?

Are there variations of the regular runtimes of the Big-O-Notation?

find not returning expected files

How do I tell my supervisor that he is choosing poor replacements for me while I am on maternity leave?

Should these notes be played as a chord or one after another?

Control variables and other independent variables

Why can't RGB or bicolour LEDs produce a decent yellow?

On what legal basis did the UK remove the 'European Union' from its passport?

On studying Computer Science vs. Software Engineering to become a proficient coder

Was there a contingency plan in place if Little Boy failed to detonate?

Thesis' "Future Work" section – is it acceptable to omit personal involvement in a mentioned project?

Ex-manager wants to stay in touch, I don't want to

Noob at soldering, can anyone explain why my circuit won't work?

Is there enough time to Planar Bind a creature conjured by a 1-hour-duration spell?



How to formulate Dynamic Excel Ranges


How to create Excel (.XLS and .XLSX) file in C# without installing Ms Office?How do I properly clean up Excel interop objects?Import and Export Excel - What is the best library?Excel: Find the minimal value in a columnNegative values and postive values in excelHow to find two difference number values between A1 and B1 less than or equal to 10 value in Excelhow to populate an excel cell using multiple =IF functionExcel formula for greater than but less than with several tiersExcel doesn't calculate simple arithmetic operations correctlyCustom Filter in Excel Interop using c#






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















Column C Column D Column E
14 6 1
11 16.52
5 82.64
30 0
60 0
12 0
9 0
4 0


I have these three columns and they are all user input so they are numerically dynamic.
Column C has a range of numbers, some less than the value in Column D.
Column E has values greater than 0.
The 0 in Column E signifies do not calculate the same row in Column C.
What I need to do is take the corresponding Non-Zero values in Column E and test the values in Column C to be less than Column D.
Then take the difference between Column D and any values in Column C less than Column D and divide that value by the COUNT of Column C equal or greater than Column D.
For example as it is now. In Column C I would not evaluate Row 5:9 because Column E has 0 in those rows.
Column C Row 4 is the value 5, which is 1 less than Column D 6 so the difference is 1. There are 2 values in Column C that are equal or greater than Column D
so the result is 1/2 = .5



Another Example:



Column C Column D Column E
14 6 1
11 16.52
5 82.64
30 0
60 0
12 0
9 0
4 19.56


In this example there are 4 used values in Column C Row 2,3,4,9. Two of the values are less than Column D by D2-C4 + D2-C9 = 3.
The result is 3/2 = 1.5



Another Example:



Column C Column D Column E
14 6 1
11 16.52
5 0
30 0
60 0
6 18.66
9 0
4 0


The result is 0/3 = 0



I've tried to figure something out with INDEX/MATCH, SUMPRODUCT, COUNTIFS, SMALL, INDIRECT, MIN, but this is beyond my EXCEL capabilities.










share|improve this question




























    0















    Column C Column D Column E
    14 6 1
    11 16.52
    5 82.64
    30 0
    60 0
    12 0
    9 0
    4 0


    I have these three columns and they are all user input so they are numerically dynamic.
    Column C has a range of numbers, some less than the value in Column D.
    Column E has values greater than 0.
    The 0 in Column E signifies do not calculate the same row in Column C.
    What I need to do is take the corresponding Non-Zero values in Column E and test the values in Column C to be less than Column D.
    Then take the difference between Column D and any values in Column C less than Column D and divide that value by the COUNT of Column C equal or greater than Column D.
    For example as it is now. In Column C I would not evaluate Row 5:9 because Column E has 0 in those rows.
    Column C Row 4 is the value 5, which is 1 less than Column D 6 so the difference is 1. There are 2 values in Column C that are equal or greater than Column D
    so the result is 1/2 = .5



    Another Example:



    Column C Column D Column E
    14 6 1
    11 16.52
    5 82.64
    30 0
    60 0
    12 0
    9 0
    4 19.56


    In this example there are 4 used values in Column C Row 2,3,4,9. Two of the values are less than Column D by D2-C4 + D2-C9 = 3.
    The result is 3/2 = 1.5



    Another Example:



    Column C Column D Column E
    14 6 1
    11 16.52
    5 0
    30 0
    60 0
    6 18.66
    9 0
    4 0


    The result is 0/3 = 0



    I've tried to figure something out with INDEX/MATCH, SUMPRODUCT, COUNTIFS, SMALL, INDIRECT, MIN, but this is beyond my EXCEL capabilities.










    share|improve this question
























      0












      0








      0








      Column C Column D Column E
      14 6 1
      11 16.52
      5 82.64
      30 0
      60 0
      12 0
      9 0
      4 0


      I have these three columns and they are all user input so they are numerically dynamic.
      Column C has a range of numbers, some less than the value in Column D.
      Column E has values greater than 0.
      The 0 in Column E signifies do not calculate the same row in Column C.
      What I need to do is take the corresponding Non-Zero values in Column E and test the values in Column C to be less than Column D.
      Then take the difference between Column D and any values in Column C less than Column D and divide that value by the COUNT of Column C equal or greater than Column D.
      For example as it is now. In Column C I would not evaluate Row 5:9 because Column E has 0 in those rows.
      Column C Row 4 is the value 5, which is 1 less than Column D 6 so the difference is 1. There are 2 values in Column C that are equal or greater than Column D
      so the result is 1/2 = .5



      Another Example:



      Column C Column D Column E
      14 6 1
      11 16.52
      5 82.64
      30 0
      60 0
      12 0
      9 0
      4 19.56


      In this example there are 4 used values in Column C Row 2,3,4,9. Two of the values are less than Column D by D2-C4 + D2-C9 = 3.
      The result is 3/2 = 1.5



      Another Example:



      Column C Column D Column E
      14 6 1
      11 16.52
      5 0
      30 0
      60 0
      6 18.66
      9 0
      4 0


      The result is 0/3 = 0



      I've tried to figure something out with INDEX/MATCH, SUMPRODUCT, COUNTIFS, SMALL, INDIRECT, MIN, but this is beyond my EXCEL capabilities.










      share|improve this question














      Column C Column D Column E
      14 6 1
      11 16.52
      5 82.64
      30 0
      60 0
      12 0
      9 0
      4 0


      I have these three columns and they are all user input so they are numerically dynamic.
      Column C has a range of numbers, some less than the value in Column D.
      Column E has values greater than 0.
      The 0 in Column E signifies do not calculate the same row in Column C.
      What I need to do is take the corresponding Non-Zero values in Column E and test the values in Column C to be less than Column D.
      Then take the difference between Column D and any values in Column C less than Column D and divide that value by the COUNT of Column C equal or greater than Column D.
      For example as it is now. In Column C I would not evaluate Row 5:9 because Column E has 0 in those rows.
      Column C Row 4 is the value 5, which is 1 less than Column D 6 so the difference is 1. There are 2 values in Column C that are equal or greater than Column D
      so the result is 1/2 = .5



      Another Example:



      Column C Column D Column E
      14 6 1
      11 16.52
      5 82.64
      30 0
      60 0
      12 0
      9 0
      4 19.56


      In this example there are 4 used values in Column C Row 2,3,4,9. Two of the values are less than Column D by D2-C4 + D2-C9 = 3.
      The result is 3/2 = 1.5



      Another Example:



      Column C Column D Column E
      14 6 1
      11 16.52
      5 0
      30 0
      60 0
      6 18.66
      9 0
      4 0


      The result is 0/3 = 0



      I've tried to figure something out with INDEX/MATCH, SUMPRODUCT, COUNTIFS, SMALL, INDIRECT, MIN, but this is beyond my EXCEL capabilities.







      excel






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 23 at 10:46









      WesZWesZ

      547




      547






















          1 Answer
          1






          active

          oldest

          votes


















          2














          A SUMIFS, a couple of COUNTIFS and some math should do it.



          =(D2*COUNTIFS(E:E, "<>"&0, C:C, "<"&D2)-SUMIFS(C:C, E:E, "<>"&0, C:C, "<"&D2))/COUNTIFS(E:E, "<>"&0, C:C, ">="&D2)





          share|improve this answer























          • Hi and thanks for your time. The result of your formula based on my first example is giving me a 1 and it should be .5.

            – WesZ
            Mar 23 at 11:58











          • Hi, I tightened up the ranges and it worked great!! I had a spurious "5" in E26 that it picked up...

            – WesZ
            Mar 23 at 12:45











          • Thanks for clearing that up. I'm glad things worked out for you.

            – user11246173
            Mar 23 at 12:50











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55312900%2fhow-to-formulate-dynamic-excel-ranges%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          A SUMIFS, a couple of COUNTIFS and some math should do it.



          =(D2*COUNTIFS(E:E, "<>"&0, C:C, "<"&D2)-SUMIFS(C:C, E:E, "<>"&0, C:C, "<"&D2))/COUNTIFS(E:E, "<>"&0, C:C, ">="&D2)





          share|improve this answer























          • Hi and thanks for your time. The result of your formula based on my first example is giving me a 1 and it should be .5.

            – WesZ
            Mar 23 at 11:58











          • Hi, I tightened up the ranges and it worked great!! I had a spurious "5" in E26 that it picked up...

            – WesZ
            Mar 23 at 12:45











          • Thanks for clearing that up. I'm glad things worked out for you.

            – user11246173
            Mar 23 at 12:50















          2














          A SUMIFS, a couple of COUNTIFS and some math should do it.



          =(D2*COUNTIFS(E:E, "<>"&0, C:C, "<"&D2)-SUMIFS(C:C, E:E, "<>"&0, C:C, "<"&D2))/COUNTIFS(E:E, "<>"&0, C:C, ">="&D2)





          share|improve this answer























          • Hi and thanks for your time. The result of your formula based on my first example is giving me a 1 and it should be .5.

            – WesZ
            Mar 23 at 11:58











          • Hi, I tightened up the ranges and it worked great!! I had a spurious "5" in E26 that it picked up...

            – WesZ
            Mar 23 at 12:45











          • Thanks for clearing that up. I'm glad things worked out for you.

            – user11246173
            Mar 23 at 12:50













          2












          2








          2







          A SUMIFS, a couple of COUNTIFS and some math should do it.



          =(D2*COUNTIFS(E:E, "<>"&0, C:C, "<"&D2)-SUMIFS(C:C, E:E, "<>"&0, C:C, "<"&D2))/COUNTIFS(E:E, "<>"&0, C:C, ">="&D2)





          share|improve this answer













          A SUMIFS, a couple of COUNTIFS and some math should do it.



          =(D2*COUNTIFS(E:E, "<>"&0, C:C, "<"&D2)-SUMIFS(C:C, E:E, "<>"&0, C:C, "<"&D2))/COUNTIFS(E:E, "<>"&0, C:C, ">="&D2)






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 23 at 11:06







          user11246173



















          • Hi and thanks for your time. The result of your formula based on my first example is giving me a 1 and it should be .5.

            – WesZ
            Mar 23 at 11:58











          • Hi, I tightened up the ranges and it worked great!! I had a spurious "5" in E26 that it picked up...

            – WesZ
            Mar 23 at 12:45











          • Thanks for clearing that up. I'm glad things worked out for you.

            – user11246173
            Mar 23 at 12:50

















          • Hi and thanks for your time. The result of your formula based on my first example is giving me a 1 and it should be .5.

            – WesZ
            Mar 23 at 11:58











          • Hi, I tightened up the ranges and it worked great!! I had a spurious "5" in E26 that it picked up...

            – WesZ
            Mar 23 at 12:45











          • Thanks for clearing that up. I'm glad things worked out for you.

            – user11246173
            Mar 23 at 12:50
















          Hi and thanks for your time. The result of your formula based on my first example is giving me a 1 and it should be .5.

          – WesZ
          Mar 23 at 11:58





          Hi and thanks for your time. The result of your formula based on my first example is giving me a 1 and it should be .5.

          – WesZ
          Mar 23 at 11:58













          Hi, I tightened up the ranges and it worked great!! I had a spurious "5" in E26 that it picked up...

          – WesZ
          Mar 23 at 12:45





          Hi, I tightened up the ranges and it worked great!! I had a spurious "5" in E26 that it picked up...

          – WesZ
          Mar 23 at 12:45













          Thanks for clearing that up. I'm glad things worked out for you.

          – user11246173
          Mar 23 at 12:50





          Thanks for clearing that up. I'm glad things worked out for you.

          – user11246173
          Mar 23 at 12:50



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55312900%2fhow-to-formulate-dynamic-excel-ranges%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript