Averaging data on inserted rows in Excel

Closed
kurugfrancis - Updated on Oct 24, 2019 at 07:23 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen January 16, 2023 - Dec 17, 2019 at 11:33 AM
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?

2 responses

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen January 16, 2023 549
Oct 24, 2019 at 11:53 AM
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

0
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.
0
CantFIXstupid
Oct 24, 2019 at 04:20 PM
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.
0
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen January 16, 2023 549
Oct 28, 2019 at 12:29 PM
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?
0
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.
0
more_stupidness
Oct 28, 2019 at 04:33 PM
any 'ole cell will do, place it into ZZ65789
0
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen January 16, 2023 549
Oct 29, 2019 at 01:01 PM
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

0
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.
0
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen January 16, 2023 549
Oct 31, 2019 at 12:53 PM
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
0
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.
0
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen January 16, 2023 549
Nov 4, 2019 at 11:34 AM
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
0
Thank you very much.
0