Offset from an Aggregate function
up vote
1
down vote
favorite
I need to offset 1 column to the left from an Aggregate formula. Currently, the formula is returning the Kth smallest value IF a condition is met.
=AGGREGATE(15,6,$B$2:$C$1000/($A$2:$A$1000=$G$9),ROW(1:1))
Essentially if the condition is met, it divides by 1 resulting in the original value found by Aggregate. I want to obtain the value from 1 column over though and I am not sure how to do this.
Simply using:
=OFFSET(AGGREGATE(15,6,$B$2:$C$1000/($A$2:$A$1000=$G$9),ROW(1:1)),0,-1)
Does not work.
excel excel-formula
add a comment |
up vote
1
down vote
favorite
I need to offset 1 column to the left from an Aggregate formula. Currently, the formula is returning the Kth smallest value IF a condition is met.
=AGGREGATE(15,6,$B$2:$C$1000/($A$2:$A$1000=$G$9),ROW(1:1))
Essentially if the condition is met, it divides by 1 resulting in the original value found by Aggregate. I want to obtain the value from 1 column over though and I am not sure how to do this.
Simply using:
=OFFSET(AGGREGATE(15,6,$B$2:$C$1000/($A$2:$A$1000=$G$9),ROW(1:1)),0,-1)
Does not work.
excel excel-formula
OFFSET() needs a range as the first argument, but the result of AGGREGATE is not a range. You could maybe use INDEX/MATCH to achieve what you want.
– Tim Williams
Nov 10 at 6:35
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I need to offset 1 column to the left from an Aggregate formula. Currently, the formula is returning the Kth smallest value IF a condition is met.
=AGGREGATE(15,6,$B$2:$C$1000/($A$2:$A$1000=$G$9),ROW(1:1))
Essentially if the condition is met, it divides by 1 resulting in the original value found by Aggregate. I want to obtain the value from 1 column over though and I am not sure how to do this.
Simply using:
=OFFSET(AGGREGATE(15,6,$B$2:$C$1000/($A$2:$A$1000=$G$9),ROW(1:1)),0,-1)
Does not work.
excel excel-formula
I need to offset 1 column to the left from an Aggregate formula. Currently, the formula is returning the Kth smallest value IF a condition is met.
=AGGREGATE(15,6,$B$2:$C$1000/($A$2:$A$1000=$G$9),ROW(1:1))
Essentially if the condition is met, it divides by 1 resulting in the original value found by Aggregate. I want to obtain the value from 1 column over though and I am not sure how to do this.
Simply using:
=OFFSET(AGGREGATE(15,6,$B$2:$C$1000/($A$2:$A$1000=$G$9),ROW(1:1)),0,-1)
Does not work.
excel excel-formula
excel excel-formula
edited Nov 10 at 3:58
K.Dᴀᴠɪs
6,076112140
6,076112140
asked Nov 10 at 3:39
Kevin P.
898
898
OFFSET() needs a range as the first argument, but the result of AGGREGATE is not a range. You could maybe use INDEX/MATCH to achieve what you want.
– Tim Williams
Nov 10 at 6:35
add a comment |
OFFSET() needs a range as the first argument, but the result of AGGREGATE is not a range. You could maybe use INDEX/MATCH to achieve what you want.
– Tim Williams
Nov 10 at 6:35
OFFSET() needs a range as the first argument, but the result of AGGREGATE is not a range. You could maybe use INDEX/MATCH to achieve what you want.
– Tim Williams
Nov 10 at 6:35
OFFSET() needs a range as the first argument, but the result of AGGREGATE is not a range. You could maybe use INDEX/MATCH to achieve what you want.
– Tim Williams
Nov 10 at 6:35
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
OFFSET works on a range, not a function. You need to wrap OFFSET around the range parameters of your aggregate function.
It is not clear from your question which ranges you want to offset by one column. An example to offset the parameter $G$9
by one column would be
=AGGREGATE(15,6,$B$2:$C$1000/($A$2:$A$1000=offset($G$9,0,-1)),ROW(1:1))
Note how the OFFSET applies to the range, not the function.
But if you use relative cell references for G9, you can simply copy the formula to a cell one to the left to achieve the same result.
For example, if this formula is in cell Z1 ...
=AGGREGATE(15,6,$B$2:$C$1000/($A$2:$A$1000=G9),ROW(1:1))
(note that the reference to G9 has no $ signs and thus is relative, so it changes when the formula is copied to a different cell)
... then you can have the result of the change with the Offset if you copy the formula to cell Y1.
A helper cell using this technique will be a lot faster than using OFFSET, since OFFSET is volatile and will cause a recalculation of the whole workbook whenever a single cell is changed. So, if you feel your workbook is slow, get rid of OFFSET and other volatile functions.
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
OFFSET works on a range, not a function. You need to wrap OFFSET around the range parameters of your aggregate function.
It is not clear from your question which ranges you want to offset by one column. An example to offset the parameter $G$9
by one column would be
=AGGREGATE(15,6,$B$2:$C$1000/($A$2:$A$1000=offset($G$9,0,-1)),ROW(1:1))
Note how the OFFSET applies to the range, not the function.
But if you use relative cell references for G9, you can simply copy the formula to a cell one to the left to achieve the same result.
For example, if this formula is in cell Z1 ...
=AGGREGATE(15,6,$B$2:$C$1000/($A$2:$A$1000=G9),ROW(1:1))
(note that the reference to G9 has no $ signs and thus is relative, so it changes when the formula is copied to a different cell)
... then you can have the result of the change with the Offset if you copy the formula to cell Y1.
A helper cell using this technique will be a lot faster than using OFFSET, since OFFSET is volatile and will cause a recalculation of the whole workbook whenever a single cell is changed. So, if you feel your workbook is slow, get rid of OFFSET and other volatile functions.
add a comment |
up vote
1
down vote
accepted
OFFSET works on a range, not a function. You need to wrap OFFSET around the range parameters of your aggregate function.
It is not clear from your question which ranges you want to offset by one column. An example to offset the parameter $G$9
by one column would be
=AGGREGATE(15,6,$B$2:$C$1000/($A$2:$A$1000=offset($G$9,0,-1)),ROW(1:1))
Note how the OFFSET applies to the range, not the function.
But if you use relative cell references for G9, you can simply copy the formula to a cell one to the left to achieve the same result.
For example, if this formula is in cell Z1 ...
=AGGREGATE(15,6,$B$2:$C$1000/($A$2:$A$1000=G9),ROW(1:1))
(note that the reference to G9 has no $ signs and thus is relative, so it changes when the formula is copied to a different cell)
... then you can have the result of the change with the Offset if you copy the formula to cell Y1.
A helper cell using this technique will be a lot faster than using OFFSET, since OFFSET is volatile and will cause a recalculation of the whole workbook whenever a single cell is changed. So, if you feel your workbook is slow, get rid of OFFSET and other volatile functions.
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
OFFSET works on a range, not a function. You need to wrap OFFSET around the range parameters of your aggregate function.
It is not clear from your question which ranges you want to offset by one column. An example to offset the parameter $G$9
by one column would be
=AGGREGATE(15,6,$B$2:$C$1000/($A$2:$A$1000=offset($G$9,0,-1)),ROW(1:1))
Note how the OFFSET applies to the range, not the function.
But if you use relative cell references for G9, you can simply copy the formula to a cell one to the left to achieve the same result.
For example, if this formula is in cell Z1 ...
=AGGREGATE(15,6,$B$2:$C$1000/($A$2:$A$1000=G9),ROW(1:1))
(note that the reference to G9 has no $ signs and thus is relative, so it changes when the formula is copied to a different cell)
... then you can have the result of the change with the Offset if you copy the formula to cell Y1.
A helper cell using this technique will be a lot faster than using OFFSET, since OFFSET is volatile and will cause a recalculation of the whole workbook whenever a single cell is changed. So, if you feel your workbook is slow, get rid of OFFSET and other volatile functions.
OFFSET works on a range, not a function. You need to wrap OFFSET around the range parameters of your aggregate function.
It is not clear from your question which ranges you want to offset by one column. An example to offset the parameter $G$9
by one column would be
=AGGREGATE(15,6,$B$2:$C$1000/($A$2:$A$1000=offset($G$9,0,-1)),ROW(1:1))
Note how the OFFSET applies to the range, not the function.
But if you use relative cell references for G9, you can simply copy the formula to a cell one to the left to achieve the same result.
For example, if this formula is in cell Z1 ...
=AGGREGATE(15,6,$B$2:$C$1000/($A$2:$A$1000=G9),ROW(1:1))
(note that the reference to G9 has no $ signs and thus is relative, so it changes when the formula is copied to a different cell)
... then you can have the result of the change with the Offset if you copy the formula to cell Y1.
A helper cell using this technique will be a lot faster than using OFFSET, since OFFSET is volatile and will cause a recalculation of the whole workbook whenever a single cell is changed. So, if you feel your workbook is slow, get rid of OFFSET and other volatile functions.
answered Nov 10 at 6:40
teylyn
21.6k33352
21.6k33352
add a comment |
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%2f53235805%2foffset-from-an-aggregate-function%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
OFFSET() needs a range as the first argument, but the result of AGGREGATE is not a range. You could maybe use INDEX/MATCH to achieve what you want.
– Tim Williams
Nov 10 at 6:35