Closed Thread
Results 1 to 11 of 11

summe column depending of other columns

  1. #1
    Registered User
    Join Date
    05-15-2007
    Posts
    5

    summe column depending of other columns

    Hi
    I have a problem :I want to create a macro that make the somme of 2 other columns when the nummer of the first column ist double(more than one ) and put the somme in a new Rows. like this :

    A B
    23 5
    23 12
    23 2
    45 4
    45 1
    46 3
    in the news the resultat in the same columns itīs like this
    A B
    23 19
    45 5
    46 3

    Thanks for your comprehenssion

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    Try with this macro (it will put output data one row after last row):

    Please Login or Register  to view this content.
    Regards,
    Antonio

  3. #3
    Registered User
    Join Date
    05-15-2007
    Posts
    5
    Quote Originally Posted by antoka05
    Try with this macro (it will put output data one row after last row):

    Please Login or Register  to view this content.
    Regards,
    Antonio
    Thanks Antonio
    But i dont want to go get the result in other row or columns , I want just they numbers stay in place and give the result .
    Thanks

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,202
    Cross posted
    here
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    Try with this faster macro (it will put data in range 'a2' replacing old data. Please indicate your first free column in the first row because this code need two free column where sum data:

    Please Login or Register  to view this content.
    Regards,
    Antonio

  6. #6
    Registered User
    Join Date
    05-15-2007
    Posts
    5
    Quote Originally Posted by antoka05
    Try with this faster macro (it will put data in range 'a2' replacing old data. Please indicate your first free column in the first row because this code need two free column where sum data:

    Please Login or Register  to view this content.
    Regards,
    Antonio
    thanks Antonio
    but I replace my first Columns ist "D" but it doesnīt works
    thanks

  7. #7
    Registered User
    Join Date
    05-15-2007
    Posts
    5
    Hi
    i will like to make for 2 columns C und D , itīs possible ?

  8. #8
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    The macro apply advanced filter and do a unique copy of column 'A' in one free column you indicate (for example 'C'), then apply formula to next columns (for example 'D') to get sum for all unique data. At the end copy all data (for example from column 'C-D') to cell 'A2'.
    You can indicate the column you want (except 'A' or 'B' where you have data to copy/sum).

    Regards,
    Antonio

  9. #9
    Registered User
    Join Date
    05-15-2007
    Posts
    5
    Quote Originally Posted by antoka05
    The macro apply advanced filter and do a unique copy of column 'A' in one free column you indicate (for example 'C'), then apply formula to next columns (for example 'D') to get sum for all unique data. At the end copy all data (for example from column 'C-D') to cell 'A2'.
    You can indicate the column you want (except 'A' or 'B' where you have data to copy/sum).

    Regards,
    Antonio
    Thanks
    I want to make at the same time A -C,D. the code can be change for that .Now i have only for one column ex : A-C , but now I want for A-C,D

  10. #10
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    You mean you have data in columns 'c' and 'd'? I'm sorry but I don't understand well what you need.

    Regards,
    Antonio

  11. #11
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    jokenjo


    Please read forum rules

    You have cross posted this thread to other sites

    Clossing thread
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

Closed 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