Forum Discussion
Change the absolute reference into new one whenever copy to new location
I hope I get help with that if possible
- chavanpr12Apr 24, 2019Copper Contributor
Twifoo Sorry this is the first time in community so I didn't had an idea about the procedure to solve the method. I have explained my problem in excel file itself. Please do check and help to solve the problem.
Thank you
- TwifooApr 25, 2019Silver Contributor
In the attached file, the formula in B1, copied down rows, is:
=(MAX(INDEX(A$1:A2,
IFERROR(AGGREGATE(14,6,1/(A$1:A1="")*ROW(A$1:A1),1)+1,1)):
INDEX(A1:A10,
MATCH(1,INDEX(--(A1:A10=""),0),0)-1))=A1)*A1Note that the foregoing formula follows a logic similar to that of SergeiBaklan . Nonetheless, it is a non-array formula and assumes that the maximum number of cells to be evaluated at any given instance is 9. If, for example, such maximum is 99, A10 will have to be modified to A100, as follows:
=(MAX(INDEX(A$1:A2,
IFERROR(AGGREGATE(14,6,1/(A$1:A1="")*ROW(A$1:A1),1)+1,1)):
INDEX(A1:A100,
MATCH(1,INDEX(--(A1:A100=""),0),0)-1))=A1)*A1By the way, Sergei's formula assumes such maximum to be 999.
- SergeiBaklanApr 24, 2019Diamond Contributor
Straigthforward solution could be
=IF((MAX(INDEX($A$1:A1000,IFERROR(AGGREGATE(14,6,1/($A$1:A1="")*ROW($A$1:A1),1)+1,1)):INDEX(A1:A1000,MATCH(1,INDEX(--(A1:A1000=""),0),0)-1))=A1),A1,0)
CSE formula
- SergeiBaklanApr 25, 2019Diamond Contributor
Reading Twifoo post I corrected a bit the formula to drop limitation
1) Actually all formulas are regular (not array ones), includes initial
2) A1:A1000 could be changed on A1:A$1048576, but that's performance
=IF((MAX(INDEX(A:A,IFERROR(AGGREGATE(14,6,1/($A$1:A1="")*ROW($A$1:A1),1)+1,1)):INDEX(A1:A$1048576,MATCH(1,INDEX(--(A1:A$1048576=""),0),0)-1))=A1),A1,0)