Averaging data on inserted rows in Excel

-
Hello,

Please after successfully inserting specific number of rows in excel, is there any code that can help you average the data on the inserted rows?
See more 

2 replies

Posts
2573
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 9, 2019
381
0
Thank you
Hi Kurug,

With the given info it is impossible to help you. Could you provide more details?

1. Do you manually insert those rows?
2. Which column(s) of the inserted rows would you like to get the average of?
3. When we have the average, what do you want to do with it? Place it in a cell or show it as a message or ...?

These are just some questions that pops up in my head. If there is more relevant info, do inform us.

Best regards,
Trowa

Please I appreciate your effort to help me and may God richly bless you.

What I actually want to do is that, I have a data which covers a number of countries and variables for the time period 1996 to 2016.

So I want to find the averages for each variable for every three (3) years. This will help me to use the average values for some analysis.

Thank you.

Hope to get your reply soon.
You didnt answer a single question the man asked you. Great job. Dont you know how to manually calculate average? It is sum of all items, divided by the number of items.
TrowaD
Posts
2573
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 9, 2019
381 -
Well, as CantFIXstupid kindly pointed out to you, you didn't provide any relevant info to help you. Not sure what you expect from me?
Sorry TrowaD, I thought that will rather make it simple for you to understand me better.

Now in response to your questions,
1) I did not manually inserted the rows. I used a code.
2) I want to get the average for every fifth column of the inserted rows
3) I want to place the averages on a cell

I hope this answers your questions?
Thank you.
-
any 'ole cell will do, place it into ZZ65789
Respond to TrowaD
Posts
2573
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 9, 2019
381
0
Thank you
Hi Kurug,

No worries.

Some more questions though:

4. Since you use a code to insert rows, I either have to know that the insertion part of the code is at the bottom (meaning, the inserted part is still selected) or I have to know the code (assuming you don't know how to alter your code).

5. There are 16384 columns and I'm pretty sure you don't use all of them. So how many columns do you use or how many averages do you want? No need to make the code do more than is needed.

6. Which range did you have in mind to place the averages?


That should do it.

Best regards,
Trowa

Thanks once again TrowaD

4. The code is VBA code
5. I have used 41 columns but I need the averages for 39 columns.
6. Range 1540R x 38C

Hope this answers the questions? I am not really sure if this is what you need.

Thank you.
TrowaD
Posts
2573
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 9, 2019
381 -
Hi Kurug,

Uhm, no not quite. So let me rephrase:

4. Can you post your code?
5. Just checking here: Columns used are from A to AO and the averages are in every 5th column so E, J, O ... etc..
6. What you presented here is a single cell (AL1540), but we will have 8 averages. Going from your given cell, do you want to go down (cells AL1540 to AL1547) or to the right (cells AL1540 to AS1540)?

Best regards,
Trowa
Please TrowaD, is possible for to get your email address so that I can send the code because there I cannot upload any document.

Thank you.
TrowaD
Posts
2573
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 9, 2019
381 -
Hi Kurug,

You can use any free file sharing site like http://ge.tt, to upload your file there and then post back the download link. Always be careful with sensitive data.

Best regards,
Trowa
Thank you very much.
Respond to TrowaD