+ Reply to Thread
Results 1 to 4 of 4

Macro that will sum values from column if rows meet certain criteria [better sumif]

  1. #1
    Registered User
    Join Date
    03-30-2015
    Location
    Europe
    MS-Off Ver
    2007
    Posts
    2

    Macro that will sum values from column if rows meet certain criteria [better sumif]

    Hi,

    I want to create a macro which will make new file that will contain data from other file. While my English is bad and I really can't explain what I want, I hope that this picture representation will show what I mean.

    I have this file (NAZWA means NAME and Wartość means VALUE):

    pottAQK.png

    And after running the macro, I want to have this new file:

    http://i.imgur.com/a96GKJ4.png

    Thanks in advance for every response!


    PS. SUMIF is not the way, as files are much, much bigger than those in example.
    Attached Images Attached Images

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,346

    Re: Macro that will sum values from column if rows meet certain criteria [better sumif]

    Use a Pivot Table. Should be very straightforward. Insert tab. Choose Pivot Table. NAZWA goes in the row header and Wartość goes in the values. Done.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    03-30-2015
    Location
    Europe
    MS-Off Ver
    2007
    Posts
    2

    Re: Macro that will sum values from column if rows meet certain criteria [better sumif]

    Thank you for very quick response! I have to admit, that I've never heard about pivot tables (I'm new to Excel), but this seems to be, in fact, solution to my problem.

    Thank you again, kind man.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,346

    Re: Macro that will sum values from column if rows meet certain criteria [better sumif]

    You're welcome. Thanks for the rep.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Count of rows in an array that meet criteria in column 2 and different criteria in column3
    By reynoldslarry in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-09-2013, 01:51 AM
  2. How to average alternating values across rows that meet a certain criteria
    By doubleM3000 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-10-2012, 07:58 PM
  3. [SOLVED] Count Unique Values in Column A that meet criteria in Column B
    By ashakespeare in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-04-2012, 07:33 PM
  4. Replies: 7
    Last Post: 09-13-2011, 12:04 PM
  5. [SOLVED] Sum the values of one column, only if they meet certain criteria .
    By Todd Pippin in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-08-2005, 02:06 PM

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