The formulas you're using are referencing the cells....independent of the
values they contain. Sorting is the equivalent of re-typing the values in a
different order, not moving the cells.
It sounds like you want the formulas to adjust their references based on the
location of cell values. Your current structure wouldn't support that, but
this might be an approach you could use:
Example:
A1:D6 contains...
Seq_Name____Amt1___Amt2
1___Delta_____4_____40
2___Charlie___3_____30
3___Bravo_____2_____20
4___Alpha_____1_____10
5___Echo______5_____50
F2: (a seq to reference....eg 4)
This formula "finds" the Seq from F2 in Col_A and
returns the associated average of Cols C and D:
G2:
=AVERAGE(INDEX($C$2:$C$6,MATCH(F2,$A$2:$A$6,0)):INDEX($D$2:$D$6,MATCH(F2,$A$2:$A$6,0)))
If you sort the data in descending order by Seq, that formula will still
find the Seq from F2 in that data and return the same average. In the
example,
G2 returns 5.5 before, and after, the sort.
Is that something you can work with?
--------------------------
Regards,
Ron
Microsoft MVP (Excel)
(XL2003, Win XP)
> Hi,
>
[quoted text clipped - 43 lines]
> Thanks,
> Scotty81
schlagce@airproducts.com - 07 Mar 2008 02:35 GMT
On Mar 6, 7:55 am, "Ron Coderre" <ronREMOVETHIScode...@bigfoot.com>
wrote:
> The formulas you're using are referencing the cells....independent of the
> values they contain. Sorting is the equivalent of re-typing the values in a
[quoted text clipped - 88 lines]
>
> - Show quoted text -
Ron,
Yes, thanks - that does do the job. I've worked in Excel for some
time, but have not had the experience of working with the Match and
Index formulas. The only unfortunate part is that it would make the
AVERAGE formulas more lengthy. That formula was just a simpler
example of what I do with some of the numbers. However, it does make
the 2nd tab guaranteed to return the correct value regardless of the
sort order.
Thanks again,
Scotty81
Ron Coderre - 07 Mar 2008 02:38 GMT
I'm glad you could use that.
--------------------------
Regards,
Ron
Microsoft MVP (Excel)
(XL2003, Win XP)
On Mar 6, 7:55 am, "Ron Coderre" <ronREMOVETHIScode...@bigfoot.com>
wrote:
> The formulas you're using are referencing the cells....independent of the
> values they contain. Sorting is the equivalent of re-typing the values in
[quoted text clipped - 90 lines]
>
> - Show quoted text -
Ron,
Yes, thanks - that does do the job. I've worked in Excel for some
time, but have not had the experience of working with the Match and
Index formulas. The only unfortunate part is that it would make the
AVERAGE formulas more lengthy. That formula was just a simpler
example of what I do with some of the numbers. However, it does make
the 2nd tab guaranteed to return the correct value regardless of the
sort order.
Thanks again,
Scotty81