excel To return the Header from the last number that >100 in a row











up vote
0
down vote

favorite












I wish to To return the Header from the last number in row B that >100 , but currently I only manage to get the first number that >100 which is "july", But the answer that I want is "Aug" please help...



enter image description here










share|improve this question


























    up vote
    0
    down vote

    favorite












    I wish to To return the Header from the last number in row B that >100 , but currently I only manage to get the first number that >100 which is "july", But the answer that I want is "Aug" please help...



    enter image description here










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I wish to To return the Header from the last number in row B that >100 , but currently I only manage to get the first number that >100 which is "july", But the answer that I want is "Aug" please help...



      enter image description here










      share|improve this question













      I wish to To return the Header from the last number in row B that >100 , but currently I only manage to get the first number that >100 which is "july", But the answer that I want is "Aug" please help...



      enter image description here







      excel-formula






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 22 at 10:35









      Issac_n

      157




      157
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          This array formula (ctrl+shift+enter !) should do the trick:
          {=INDEX($P$1:$AA$1,MAX(IF(P2:AA2>100,COLUMN(P2:AA2)-COLUMN(INDEX(P2:AA2,1,1))+1)))}



          The way this works is the following (and you can follow this if you select a part in the formula bar in Excel and type F9 to see the intermediate result) :





          • COLUMN(P2:AA2)-COLUMN(INDEX(P2:AA2;1;1))+1 creates a very simple array withe the column numbers of your range result={1,2,3,4,5,6,7,8,9,10,11,12}

          • The P2:AA2>100 also creates an array with TRUE/FALSE when the condition is met result={FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE,FALSE,FALSE,FALSE,FALSE}

          • The IF combines both : result={FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,7,8,FALSE,FALSE,FALSE,FALSE}

          • With the MAX you select the largest value, which will be 8 in our case

          • And with the INDEX you get then the 8th value of the range, which is Aug


          So the trick is combining a matching condition with a simple sequential array with the same number of values as there are in your range.






          share|improve this answer























          • it works!!!!!, but can really understand your coding.. could u pls explain it?
            – Issac_n
            Nov 22 at 11:50










          • Ok, I'll update my answer with some explanation (and please accept the answer if it is to your satisfaction ;))
            – Peter K.
            Nov 22 at 12:01










          • possible coidng ctrl+shift+enter into vba?
            – Issac_n
            Nov 22 at 12:32










          • I never use VBA, so I cannot help you with that.
            – Peter K.
            Nov 22 at 12:58










          • @Issac_n For VBA, see this SO question and accepted answer : stackoverflow.com/questions/27604084/…
            – Peter K.
            Nov 23 at 12:36













          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',
          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%2f53429006%2fexcel-to-return-the-header-from-the-last-number-that-100-in-a-row%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








          up vote
          1
          down vote



          accepted










          This array formula (ctrl+shift+enter !) should do the trick:
          {=INDEX($P$1:$AA$1,MAX(IF(P2:AA2>100,COLUMN(P2:AA2)-COLUMN(INDEX(P2:AA2,1,1))+1)))}



          The way this works is the following (and you can follow this if you select a part in the formula bar in Excel and type F9 to see the intermediate result) :





          • COLUMN(P2:AA2)-COLUMN(INDEX(P2:AA2;1;1))+1 creates a very simple array withe the column numbers of your range result={1,2,3,4,5,6,7,8,9,10,11,12}

          • The P2:AA2>100 also creates an array with TRUE/FALSE when the condition is met result={FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE,FALSE,FALSE,FALSE,FALSE}

          • The IF combines both : result={FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,7,8,FALSE,FALSE,FALSE,FALSE}

          • With the MAX you select the largest value, which will be 8 in our case

          • And with the INDEX you get then the 8th value of the range, which is Aug


          So the trick is combining a matching condition with a simple sequential array with the same number of values as there are in your range.






          share|improve this answer























          • it works!!!!!, but can really understand your coding.. could u pls explain it?
            – Issac_n
            Nov 22 at 11:50










          • Ok, I'll update my answer with some explanation (and please accept the answer if it is to your satisfaction ;))
            – Peter K.
            Nov 22 at 12:01










          • possible coidng ctrl+shift+enter into vba?
            – Issac_n
            Nov 22 at 12:32










          • I never use VBA, so I cannot help you with that.
            – Peter K.
            Nov 22 at 12:58










          • @Issac_n For VBA, see this SO question and accepted answer : stackoverflow.com/questions/27604084/…
            – Peter K.
            Nov 23 at 12:36

















          up vote
          1
          down vote



          accepted










          This array formula (ctrl+shift+enter !) should do the trick:
          {=INDEX($P$1:$AA$1,MAX(IF(P2:AA2>100,COLUMN(P2:AA2)-COLUMN(INDEX(P2:AA2,1,1))+1)))}



          The way this works is the following (and you can follow this if you select a part in the formula bar in Excel and type F9 to see the intermediate result) :





          • COLUMN(P2:AA2)-COLUMN(INDEX(P2:AA2;1;1))+1 creates a very simple array withe the column numbers of your range result={1,2,3,4,5,6,7,8,9,10,11,12}

          • The P2:AA2>100 also creates an array with TRUE/FALSE when the condition is met result={FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE,FALSE,FALSE,FALSE,FALSE}

          • The IF combines both : result={FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,7,8,FALSE,FALSE,FALSE,FALSE}

          • With the MAX you select the largest value, which will be 8 in our case

          • And with the INDEX you get then the 8th value of the range, which is Aug


          So the trick is combining a matching condition with a simple sequential array with the same number of values as there are in your range.






          share|improve this answer























          • it works!!!!!, but can really understand your coding.. could u pls explain it?
            – Issac_n
            Nov 22 at 11:50










          • Ok, I'll update my answer with some explanation (and please accept the answer if it is to your satisfaction ;))
            – Peter K.
            Nov 22 at 12:01










          • possible coidng ctrl+shift+enter into vba?
            – Issac_n
            Nov 22 at 12:32










          • I never use VBA, so I cannot help you with that.
            – Peter K.
            Nov 22 at 12:58










          • @Issac_n For VBA, see this SO question and accepted answer : stackoverflow.com/questions/27604084/…
            – Peter K.
            Nov 23 at 12:36















          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          This array formula (ctrl+shift+enter !) should do the trick:
          {=INDEX($P$1:$AA$1,MAX(IF(P2:AA2>100,COLUMN(P2:AA2)-COLUMN(INDEX(P2:AA2,1,1))+1)))}



          The way this works is the following (and you can follow this if you select a part in the formula bar in Excel and type F9 to see the intermediate result) :





          • COLUMN(P2:AA2)-COLUMN(INDEX(P2:AA2;1;1))+1 creates a very simple array withe the column numbers of your range result={1,2,3,4,5,6,7,8,9,10,11,12}

          • The P2:AA2>100 also creates an array with TRUE/FALSE when the condition is met result={FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE,FALSE,FALSE,FALSE,FALSE}

          • The IF combines both : result={FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,7,8,FALSE,FALSE,FALSE,FALSE}

          • With the MAX you select the largest value, which will be 8 in our case

          • And with the INDEX you get then the 8th value of the range, which is Aug


          So the trick is combining a matching condition with a simple sequential array with the same number of values as there are in your range.






          share|improve this answer














          This array formula (ctrl+shift+enter !) should do the trick:
          {=INDEX($P$1:$AA$1,MAX(IF(P2:AA2>100,COLUMN(P2:AA2)-COLUMN(INDEX(P2:AA2,1,1))+1)))}



          The way this works is the following (and you can follow this if you select a part in the formula bar in Excel and type F9 to see the intermediate result) :





          • COLUMN(P2:AA2)-COLUMN(INDEX(P2:AA2;1;1))+1 creates a very simple array withe the column numbers of your range result={1,2,3,4,5,6,7,8,9,10,11,12}

          • The P2:AA2>100 also creates an array with TRUE/FALSE when the condition is met result={FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,TRUE,TRUE,FALSE,FALSE,FALSE,FALSE}

          • The IF combines both : result={FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,7,8,FALSE,FALSE,FALSE,FALSE}

          • With the MAX you select the largest value, which will be 8 in our case

          • And with the INDEX you get then the 8th value of the range, which is Aug


          So the trick is combining a matching condition with a simple sequential array with the same number of values as there are in your range.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 22 at 12:12

























          answered Nov 22 at 11:32









          Peter K.

          67111




          67111












          • it works!!!!!, but can really understand your coding.. could u pls explain it?
            – Issac_n
            Nov 22 at 11:50










          • Ok, I'll update my answer with some explanation (and please accept the answer if it is to your satisfaction ;))
            – Peter K.
            Nov 22 at 12:01










          • possible coidng ctrl+shift+enter into vba?
            – Issac_n
            Nov 22 at 12:32










          • I never use VBA, so I cannot help you with that.
            – Peter K.
            Nov 22 at 12:58










          • @Issac_n For VBA, see this SO question and accepted answer : stackoverflow.com/questions/27604084/…
            – Peter K.
            Nov 23 at 12:36




















          • it works!!!!!, but can really understand your coding.. could u pls explain it?
            – Issac_n
            Nov 22 at 11:50










          • Ok, I'll update my answer with some explanation (and please accept the answer if it is to your satisfaction ;))
            – Peter K.
            Nov 22 at 12:01










          • possible coidng ctrl+shift+enter into vba?
            – Issac_n
            Nov 22 at 12:32










          • I never use VBA, so I cannot help you with that.
            – Peter K.
            Nov 22 at 12:58










          • @Issac_n For VBA, see this SO question and accepted answer : stackoverflow.com/questions/27604084/…
            – Peter K.
            Nov 23 at 12:36


















          it works!!!!!, but can really understand your coding.. could u pls explain it?
          – Issac_n
          Nov 22 at 11:50




          it works!!!!!, but can really understand your coding.. could u pls explain it?
          – Issac_n
          Nov 22 at 11:50












          Ok, I'll update my answer with some explanation (and please accept the answer if it is to your satisfaction ;))
          – Peter K.
          Nov 22 at 12:01




          Ok, I'll update my answer with some explanation (and please accept the answer if it is to your satisfaction ;))
          – Peter K.
          Nov 22 at 12:01












          possible coidng ctrl+shift+enter into vba?
          – Issac_n
          Nov 22 at 12:32




          possible coidng ctrl+shift+enter into vba?
          – Issac_n
          Nov 22 at 12:32












          I never use VBA, so I cannot help you with that.
          – Peter K.
          Nov 22 at 12:58




          I never use VBA, so I cannot help you with that.
          – Peter K.
          Nov 22 at 12:58












          @Issac_n For VBA, see this SO question and accepted answer : stackoverflow.com/questions/27604084/…
          – Peter K.
          Nov 23 at 12:36






          @Issac_n For VBA, see this SO question and accepted answer : stackoverflow.com/questions/27604084/…
          – Peter K.
          Nov 23 at 12:36




















          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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2f53429006%2fexcel-to-return-the-header-from-the-last-number-that-100-in-a-row%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

          What visual should I use to simply compare current year value vs last year in Power BI desktop

          How to ignore python UserWarning in pytest?

          Alexandru Averescu