+ Reply to Thread
Results 1 to 3 of 3

Cumulate items macro

  1. #1
    Registered User
    Join Date
    02-26-2014
    Location
    Romānia
    MS-Off Ver
    Excel 2010
    Posts
    2

    Cumulate items macro

    I made a macro that should cumulate the items from a Timesheet Export: for example if the value from cell (2,21) is the same with the value from cell (1,21) then sum the amount from cell (2,12) to cell (1,12) and delete the entire row of cell (2,21).

    Untill now my macro does something, but it's not 100% what i want because i have to run it more times to delete all the duplicate items. The question is how to do so the loop will continue to next combination without stopping ? (if there are more then 2 same items)

    Please Login or Register  to view this content.
    Cumulate items macro- example (1).xlsm


    Thanks a lot !

  2. #2
    Registered User
    Join Date
    02-26-2014
    Location
    Romānia
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Cumulate items macro

    Hello again,

    I manage to solve this, so i will post the solution here, maybe someone else will need and use it:

    I thought that the problem was that it deleted the rows into the loop, so first we will sum the hour amounts (from duplicate items) at the first item, and at the duplicates will put 0 hours. Then we write the description in the corresponding cell of first item with ";" separator. And after this loop we create another loop for deleting the items with 0 values at the hours column. This is the code and is working good (maybe will need some adjustments to be faster- sort and delete all 0 itemes in the same time etc):

    Please Login or Register  to view this content.
    File:
    Cumulate items macro- example (1).xlsm
    Last edited by andreyGMP; 02-27-2014 at 03:54 PM.

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Cumulate items macro

    Hello andreyGMP,

    Thank you for posting your solution!
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ 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] Auto cumulate one cells data to a secondary cell.
    By ViciousxUSMC in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 02-17-2014, 11:58 AM
  2. macro to filter all items in Autofilter except 2+ items
    By DanRiverBrew in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-09-2013, 09:15 PM
  3. Macro to copy items from one tab to the other
    By cartica in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-11-2013, 10:42 AM
  4. How do I move formula to cumulate?
    By Diesel10 in forum Excel General
    Replies: 3
    Last Post: 11-10-2011, 01:04 PM
  5. Identify Items, Sort those Items, Copy the Items
    By a1981stingray in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-14-2010, 10:50 AM

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