View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jason Lepack Jason Lepack is offline
external usenet poster
 
Posts: 120
Default Formula won't adjust after sorting data

I have no idea what your data looks like or why you would want to take
the average of those cells, wwithout that information I can propose no
solution.

I can tell you that when you perform your sort your formulas will move.
I would suggest possibly removing your formulas from your sort range
if you are intending to keep your formulas in the same spot every time.

Post back with a bunch of rows of data. Show what it looks like, what
it's doing that it's not supposed to and what you would like it to do.

Cheers,
Jason Lepack

mmcap wrote:
PS I sort the entire sheet when I do the sort.

"mmcap" wrote:

Placing the formula in H49 and right now I have to sort A2-A358
alphabetically and other times I need to sort by groups which is J2-J358 and
the list will get larger with time.

"Jason Lepack" wrote:

Where are you placing that formula? What range are you sorting?

Show an example of what your data looks like and what you are trying to
accomplish.

mmcap wrote:
=SUM(D49:D52)/COUNT(D49:D52)

"Jason Lepack" wrote:

What is the formula that you are using right now?

mmcap wrote:
I use 2003 Excel. If I write a formula which works properly with the data
sorted by column A and then sort by a different column it no longer works.
There are two main groups that I need to sort by. Sometimes I need the data
sorted alphabetically (column A) and sometimes I need it sorted by groups
(column G). If I write a formula in cell (J50) while sorted alphabetically
and then sort by groups the formula in cell (J50) might move to cell (J40)
and the data that is referenced by that formula could be scattered anywhere
on the sheet so the formula is no longer relevant. Is there any way to make
the formula adjust to where it will still refer to the same data even if the
data and the formula cells move after being sorted?