Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Apr 2014
    Posts
    25
    Thanks
    19
    Thanked 0 Times in 0 Posts

    Vba macro code for calculating averages those which have more than one value...

    Hello Experts,
    I need vba macro code or excel function to calculate average for some intervals in my excel sheet which have more than one value... i need all those values to be get averaged and placed in one cell...
    more clearly,

    i have intervals like 0-2, 2-4, 4-6.... 22-24.
    in these intervals, few have got more than one values like
    B1 1 14-16 04/11/2014 14:47:27 15973.4932 329.0056 0.1789 13.7993 50.37 351.2622
    B1 14-16 04/11/2014 15:21:52 15991.8086 383.223 0.182 13.3696 52.57 351.7805
    B1 14-16 04/11/2014 15:55:50 16736.2363 348.674 0.17 11.8132 44.04 353.0467
    B1 1 16-18 04/11/2014 16:29:26 16503.9902 391.1931 0.1809 12.0871 46.88 355.1022
    B1 16-18 04/11/2014 17:52:49 17390.0293 363.868 0.1797 15.264 46.61 360.7365
    B1 1 18-20 04/11/2014 19:52:55 17204.8086 332.4145 0.1808 14.6389 44.29 352.0764

    now i need them to get averaged and placed in one cell like,
    B1 1 14-16 04/11/2014 16233.84603 AVERAGE OF ANOTHER COL, AVG ,AVG, AVG
    B1 1 16-18 04/11/2014 16947.00975 AVERAGE OF ANOTHER COL, AVG ,AVG, AVG
    B1 1 18-20 04/11/2014 17204.8086 AVERAGE OF ANOTHER COL, AVG ,AVG, AVG

    for example like this,
    B1 1 14-16 04/11/2014 16233.84603 353.6342 0.176966667 12.99403333 48.99333333 352.0298 31.77777778
    B1 1 16-18 04/11/2014 16947.00975 377.53055 0.1803 13.67555 46.745 357.91935 28.08333333
    B1 1 18-20 04/11/2014 17204.8086 332.4145 0.1808 14.6389 44.29 352.0764 25.83333333

    for you easy understanding, i have done manually in the output sheet and attached with this thread... please refer that... like this i have to do for more than 1000 files... actually this is a very big file... since i cannot attach more than 1 MB, i am deleting more cols and rows and attaching the file...
    Please experts help me...
    looking forward for the positive reply... I hope experts like you people, this will be a easy work to do...

    Thank you...

    With Kind Regards,
    Dharani.

    P.S.,
    Already i placed this question i another forum... the link is,
    http://www.excelforum.com/excel-prog...t3685439<br />
    but there i didn't get exact answer for my question.. partially i got the answers.. people in that forum they helped me a lot and they are so nice but i need the answer for this immediately thats y i am posting the question in this lounge also experts... please help me... i need this very importantly and immediately..
    Attached Files Attached Files
    Last edited by dharani suresh; 2014-05-07 at 01:50.

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    Dharani,
    I find it poor etiquette to send PMs asking for help, the forum is the place for all requests. I have no interest in becoming yours (or anyone else's) personal excel expert. My help is free to all and my goal is to educate and even have some learn from answers I have given to other posters. Sending a PM will not make me (or probably anyone else here) respond faster (in reality it typically would make me respond slower).

    I also believe it to be poor etiquette to cross-post [see http://www.excelguru.ca/content.php?184 for some thoughts that match my own]. This is especially true when there are responses in the other board and activity there that is still active. At this stage I see no reason to join in and duplicate the efforts already being expended especially given that you are already being helped there.

    Steve

  3. The Following User Says Thank You to sdckapr For This Useful Post:

    dharani suresh (2014-05-07)

  4. #3
    Lounger
    Join Date
    Apr 2014
    Posts
    25
    Thanks
    19
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by sdckapr View Post
    Dharani,
    I find it poor etiquette to send PMs asking for help, the forum is the place for all requests. I have no interest in becoming yours (or anyone else's) personal excel expert. My help is free to all and my goal is to educate and even have some learn from answers I have given to other posters. Sending a PM will not make me (or probably anyone else here) respond faster (in reality it typically would make me respond slower).

    I also believe it to be poor etiquette to cross-post [see http://www.excelguru.ca/content.php?184 for some thoughts that match my own]. This is especially true when there are responses in the other board and activity there that is still active. At this stage I see no reason to join in and duplicate the efforts already being expended especially given that you are already being helped there.

    Steve
    Thank you Steve... I am sorry... i didn't meant in this way... i was in the need of answers immediately and urgently thats why i posted in the PM. i am sorry if i hurted you and irritated you... i found you are a very nice person. that's y i asked for help..

    Regarding cross posting, i didn't meant to waste their work.. their work and all so valuable and precious i know... but i didnt get my required answer and its been almost 1 week after posting there.. but i didn't get my exact answer... i know people in that forum also will be very busy and they have lots of work... in spite of that busy schedules they are trying to help others... its a great thing..

    still here my professor tortured me to give the output, that's why i posted here also to get correct answers... thinking that i must not disturb those forums people more... i didn't meant in the wrong way... i didn't think to duplicate their valuable works... I WILL FOLLOW THE FORUM RULES...

    Thank you steve for your kind suggestions... sorry once again if i irritated you.. hereafter i will not send you PM...
    Thank you for all your help.. it's been a pleasure to get help from you..

    Thank yo so much...

    With Kind Regards,
    Dharani.
    Last edited by dharani suresh; 2014-05-07 at 23:43.

  5. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    i was in the need of answers immediately and urgently thats why i posted in the PM.
    But you need to remember we are all volunteers here. Most of us have jobs, families, and other hobbies outside of answering questions on this board. You need to respect people's time and efforts.

    Regarding cross posting, i didn't meant to waste their work.. their work and all so valuable and precious i know... but i didnt get my required answer and its been almost 1 week after posting there..
    These remark seems to me to be disrespectful of their efforts and also not quite the truth. It seems to me that based on the original posting in the other board, that it has not been a week yet (that will be tomorrow, but a week of effort for larger issues is not unheard of :It took over a week on this board for your last question, but efforts were being made all through this time and some was tweaking and modifications to changes you were making.) But even though it is near a week, you have had responses from 2 separate posters, both providing you with initial code and followup code, the most recent code from this morning (which you have not responded to yet. For me personally (and others here may disagree) I respect those efforts too much and i see no need to create additional code. That would be more work for you to debug and try and understand and also more work for people on this board.

    Good Luck on your project.
    Steve

  6. #5
    Lounger
    Join Date
    Apr 2014
    Posts
    25
    Thanks
    19
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by sdckapr View Post
    But you need to remember we are all volunteers here. Most of us have jobs, families, and other hobbies outside of answering questions on this board. You need to respect people's time and efforts.



    These remark seems to me to be disrespectful of their efforts and also not quite the truth. It seems to me that based on the original posting in the other board, that it has not been a week yet (that will be tomorrow, but a week of effort for larger issues is not unheard of :It took over a week on this board for your last question, but efforts were being made all through this time and some was tweaking and modifications to changes you were making.) But even though it is near a week, you have had responses from 2 separate posters, both providing you with initial code and followup code, the most recent code from this morning (which you have not responded to yet. For me personally (and others here may disagree) I respect those efforts too much and i see no need to create additional code. That would be more work for you to debug and try and understand and also more work for people on this board.

    Good Luck on your project.
    Steve
    Hello Steve,

    I am not kind of person who disrespects others efforts especially when they help us.. Please don’t think like this about me… I really respect all the people in such kind of forums who really help others… “”HELPING”” is a very big thing in this world… that too people like you without any contact or relationships you help others… really which has to be rewarded… such kind of people will have special hearts and minds who are ready to help others, you are one of the such kind of persons...
    I see you people as ""GOD"" who help others without anything in return..
    so please don't think bad about me and please remove the bad opinion on me..

    May be I would have waited for still more time that’s the only mistake I did… which I will never do here after in my life time..
    And also I am from India,… here’s the timings are different I hope you know this… so every morning I check the forum and every time I will respond them and thank them in case if I get any replies..

    However Steve… I am sorry for all these things. Somehow the other I made you to feel irritated and annoyed…… and I will see through that from next time this will not happen..
    And also I would like to thank you that under your guidance I started to learn vba codes also…

    Thanks for all your help and efforts in guiding me to the right path…
    Thanks a lot.. and also My big thanks to you for your best wishes...

    With Kind Regards,
    Dharani.

    PS.,
    Hereafter I will not send you any PMs… Sorry… thank you…
    Last edited by dharani suresh; 2014-05-09 at 00:00.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •