+ Reply to Thread
Results 1 to 10 of 10

macro needed to sum specific data in specific cells

  1. #1
    Forum Contributor nasser's Avatar
    Join Date
    12-29-2006
    Location
    Kuwait
    MS-Off Ver
    2010-2013-2016
    Posts
    216

    macro needed to sum specific data in specific cells

    I attached a file which explains in the comments of the cells what i exactly try to do, as a simple example >>

    A B
    JOHN S. 2
    TOMMY 1
    NASSER 2
    JOHN S. 3
    NADER 5

    so i want the total of JOHN S. (5) to be in the Col. C and to delete the line of JOHN S. 3

    this is a brief of what i try to get ,but the file that i attached is more bigger , and it will be better if it can be a MICRO not a formula

    Thank you in advance
    Attached Files Attached Files

  2. #2
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: macro needed to sum specific data in specific cells

    Do you want custom functions that you enter into the cell like "=SumOtherCharges(D:D,F:F)" Where D:D is the column you want to test for "Other Charges" and F:F is the column you want to sum?

    Or do you want macro that you run when needed that gets all sums all at once, and uses fixed column numbers?

  3. #3
    Forum Contributor nasser's Avatar
    Join Date
    12-29-2006
    Location
    Kuwait
    MS-Off Ver
    2010-2013-2016
    Posts
    216

    Re: macro needed to sum specific data in specific cells

    thank you for the fast reply . it will be great if it could be done by macro
    Last edited by nasser; 07-13-2011 at 01:11 AM.

  4. #4
    Forum Contributor nasser's Avatar
    Join Date
    12-29-2006
    Location
    Kuwait
    MS-Off Ver
    2010-2013-2016
    Posts
    216

    Re: macro needed to sum specific data in specific cells

    at least any answer to tell that it's not possible !!

  5. #5
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: macro needed to sum specific data in specific cells

    It is very possible. Sorry. I had forgotten about this thread. I'll see if I can get a code sample up sometime today.

  6. #6
    Forum Contributor nasser's Avatar
    Join Date
    12-29-2006
    Location
    Kuwait
    MS-Off Ver
    2010-2013-2016
    Posts
    216

    Re: macro needed to sum specific data in specific cells

    :-)thank you very much

  7. #7
    Forum Contributor nasser's Avatar
    Join Date
    12-29-2006
    Location
    Kuwait
    MS-Off Ver
    2010-2013-2016
    Posts
    216

    Re: macro needed to sum specific data in specific cells

    Good morning Whizbang :-)
    I made it and by SUMIF just because I need it to get finished but it took much time ,and i think this file will be more clear than the first one.
    Still looking forward for you Magical Macro please

    Thank you in advance , have a good day
    Attached Files Attached Files

  8. #8
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: macro needed to sum specific data in specific cells

    Sorry for the delay in my response. I am in the middle of a project at work and sometimes forget to check up on thread's I've participated in.

    Just to be clear, you want to:

    Sum each unique occurance of "Subno"
    Delete duplicate rows of "Subno" after the sum has taken place

    Now, I notice that in your second example, you leave the original data and then have your sum data in seperate columns. Does that mean you want me to leave your original data as is, and then just add in the unqiue/sum columns?

  9. #9
    Forum Contributor nasser's Avatar
    Join Date
    12-29-2006
    Location
    Kuwait
    MS-Off Ver
    2010-2013-2016
    Posts
    216

    Re: macro needed to sum specific data in specific cells

    welcome back ,,wish you all the best in ur project.
    about my file :
    - no need to leave the original data in a separate columns ,I left it to show which data to count under SMS and which should be under Rental etc...
    -as you see i made it by SUMIF ,so I kept it the way i made it , may be it could be useful to help in explaining something.

  10. #10
    Forum Contributor nasser's Avatar
    Join Date
    12-29-2006
    Location
    Kuwait
    MS-Off Ver
    2010-2013-2016
    Posts
    216

    Thumbs down [NOT SOLVED]: macro needed to sum specific data in specific cells

    ????? ؟؟؟؟؟
    Last edited by nasser; 08-02-2011 at 05:36 PM.

+ 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