VBA
New Member
- Joined
- Jan 19, 2009
- Messages
- 39
Heya
,
I've got an excel sheet to which I add data (whole columns) every once in a while. My first column (A) states the name of the data, my second (B) the unit and my third (C) the average value of the data in the columns behind it, each containing the data for a specific date. I hope this is understandable
My question is this:
How do I make sure column C always takes the average value (which is {=Sum(D:AA)/COUNTA(D:AA)} right now) without me having to change the last column all the time? Thus if I add a column AB, that this one will be included - or that a warning will turn up stating something like "you added a column outside the average formula".
I know I can make the formula go to column ZZ or such ... but I still there will be a day when I reach the limit... I don't add the new data to the end of the sheet, but "insert" it at the D column - so I won't see it when I reach it...
And an other question:
If I link a cell on one worksheet to a cell in another worksheet by the means "=Sheet2!B9", what exactly happens to that link when I insert rows or columns? How can I make sure that no matter what I do, it will stay linked to that particular value that was in cell B9 of Sheet2 before I started inserting rows and columns there (maybe causing the value of B9 to change, in which case I'd like the changed value to be taken over by the other worksheet).
Any help would be appreciated.
Greetings

I've got an excel sheet to which I add data (whole columns) every once in a while. My first column (A) states the name of the data, my second (B) the unit and my third (C) the average value of the data in the columns behind it, each containing the data for a specific date. I hope this is understandable
My question is this:
How do I make sure column C always takes the average value (which is {=Sum(D:AA)/COUNTA(D:AA)} right now) without me having to change the last column all the time? Thus if I add a column AB, that this one will be included - or that a warning will turn up stating something like "you added a column outside the average formula".
I know I can make the formula go to column ZZ or such ... but I still there will be a day when I reach the limit... I don't add the new data to the end of the sheet, but "insert" it at the D column - so I won't see it when I reach it...
And an other question:
If I link a cell on one worksheet to a cell in another worksheet by the means "=Sheet2!B9", what exactly happens to that link when I insert rows or columns? How can I make sure that no matter what I do, it will stay linked to that particular value that was in cell B9 of Sheet2 before I started inserting rows and columns there (maybe causing the value of B9 to change, in which case I'd like the changed value to be taken over by the other worksheet).
Any help would be appreciated.
Greetings