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...
excel-formula
add a comment |
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...
excel-formula
add a comment |
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...
excel-formula
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...
excel-formula
excel-formula
asked Nov 22 at 10:35
Issac_n
157
157
add a comment |
add a comment |
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 rangeresult={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 metresult={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 be8
in our case - And with the
INDEX
you get then the 8th value of the range, which isAug
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.
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
add a comment |
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 rangeresult={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 metresult={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 be8
in our case - And with the
INDEX
you get then the 8th value of the range, which isAug
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.
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
add a comment |
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 rangeresult={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 metresult={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 be8
in our case - And with the
INDEX
you get then the 8th value of the range, which isAug
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.
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
add a comment |
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 rangeresult={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 metresult={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 be8
in our case - And with the
INDEX
you get then the 8th value of the range, which isAug
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.
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 rangeresult={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 metresult={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 be8
in our case - And with the
INDEX
you get then the 8th value of the range, which isAug
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.
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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