+ Reply to Thread
Results 1 to 6 of 6

Duplicate inventory items, need total on quantity and amount

Hybrid View

  1. #1
    Registered User
    Join Date
    02-21-2013
    Location
    Louisville, Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    3

    Duplicate inventory items, need total on quantity and amount

    Can someone please help me with excel. I am using excel 2000. I know the very basics in excel. I need help on listing the inventory items not duplicating and getting a total on the quantity and amount. I have seen this problem solved and tried the formulas but I couldn't get them to work. I have attached part of an excel sheet. I also tried the formula =IF(A2<>A1,0,1) which picked up the duplicates, but I wasn't for sure how to write my next statement. Any help would be greatly appreciated!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Duplicate inventory items, need total on quantity and amount

    Try this one

    Sub missy()
    Dim x, i As Long, P As Long, k As Long, n As Long
    With Sheets("Items Sold to Customers").Range("a1").CurrentRegion
        x = .Value
    With CreateObject("Scripting.Dictionary")
        .Comparemode = 1
        For i = 1 To UBound(x)
            If .exists(x(i, 1)) Then
                n = .Item(x(i, 1))
                 x(.Item(x(i, 1)), 2) = x(.Item(x(i, 1)), 2) + x(i, 2)
                 x(.Item(x(i, 1)), 3) = x(.Item(x(i, 1)), 3) + x(i, 3)
            Else
                P = P + 1
                .Item(x(i, 1)) = P
                For k = 1 To UBound(x, 2)
                x(P, k) = x(i, k)
                Next k
            End If
        Next i
    
    End With
    .Range("D2").Resize(P, UBound(x, 2)).Value = x
    End With
    
    End Sub

  3. #3
    Registered User
    Join Date
    02-21-2013
    Location
    Louisville, Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Duplicate inventory items, need total on quantity and amount

    Where do you put this in at?

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Duplicate inventory items, need total on quantity and amount

    See attached
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-21-2013
    Location
    Louisville, Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Duplicate inventory items, need total on quantity and amount

    AB33, Thank you for you help, that is exactly what I needed! Thank you so much!

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Duplicate inventory items, need total on quantity and amount

    Glen,
    You are welcome!
    Could you please now close this thread as solved? Go in to the top right-hand side of this page, choose "Thread Tools" then you select solved from the drop down menu.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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