+ Reply to Thread
Results 1 to 5 of 5

Find sum in column based on name in other column

  1. #1
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Find sum in column based on name in other column

    Hi I have had this up under formulaes, but i have changed i prefer a macro to do it.
    In My test sheet i have 4 columns.
    In Column A is the country names and in column D the numbers

    I would like a macro which can count all numbers(ColumnD) from Example Denmark Column A, and display the result in another sheet(Middle Result 1)

    Important is that it count the country names(and belonging numbers column D. Because thé range could be different next time.

    If it can be made in one macro for all countries it would be great, the only thing is i need to be able to put in the cell, where i want the sum result for each country. (Example Denmark B12 sheet Middle Result 1). I have been fighting with this one and are coming closer, so this is just the last one i need to make.

    Please have a look at below test sheet.

    Thanks in advance

    Sincerely
    Abjac

    P.s Have informed the other thread that i have asked for help help for a solution.

    http://www.mrexcel.com/forum/excel-q...l-other-2.html
    Attached Files Attached Files
    Last edited by abjac; 06-16-2013 at 09:32 AM.

  2. #2
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Find sum in column based on name in other column

    Hi,

    please see attached file for Formula and VBA solution: testsum.xls

    contains in H2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and VBA:
    Please Login or Register  to view this content.
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

  3. #3
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Find sum in column based on name in other column

    Hi TehneXus. Wow that is really what i needed, Have tested all and its just working so good. Thanks allot.

    I have only one question for your macro. How can i make it display the result in the other sheet Middle Result 1. Is that possible?
    But a great code, thanks thanks

    Sincerely

    Abjac

  4. #4
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Find sum in column based on name in other column

    Hi,

    here you can specify the output sheet and the cell to start at:
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Find sum in column based on name in other column

    HI tehneXus. This is really so great. Very happy for this, have to use it tomorrow in fact but did not think it would be finish.
    Thank you so much. Wow a great code.
    Have a nice evening

    Sincerely
    Abjac

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1