Table of 1000 of rows and want result as total of each vendor in separate sheet

Ibrarbutt

New Member
Joined
Jul 23, 2015
Messages
30
Dear All

please see below a table of 1000 of rows and want result as total of each vendor in separate sheet.

Vendor nameAmount
A100
B200
C
300
A250
A450
D450
E400
G400
a200

Result required.

Vendor nameTotal Amount
ATotal of A from Above
BTotal of b from Above
CTotal of c from Above
DTotal of d from Above
continue for vendor
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
a pivot table will do that for
also what version of excel do you have

Book4
ABCDEFG
1Vendor nameAmount
2A100
3B200Row LabelsSum of Amount
4C300A1000
5A250B200
6A450C300
7D450D450
8E400E400
9G400G400
10a200Grand Total2750
11
Sheet1
 
Upvote 0
Would a simple Sumif to what you want?
Book1
AB
1Vendor nameAmount
2A100
3B200
4C300
5A250
6A450
7D450
8E400
9G400
10a200
Sheet1


Book1
AB
1Vendor nameAmount
2A1000
3B200
4C300
5D450
6F0
7G400
Sheet2
Cell Formulas
RangeFormula
B2:B7B2=SUMIF(Sheet1!A:A,A2,Sheet1!B:B)
 
Upvote 0
a pivot table will do that for
also what version of excel do you have

Book4
ABCDEFG
1Vendor nameAmount
2A100
3B200Row LabelsSum of Amount
4C300A1000
5A250B200
6A450C300
7D450D450
8E400E400
9G400G400
10a200Grand Total2750
11
Sheet1
result table i need to accomulate more details. i dont want to use the pivot table. we using office 365

Vendor nameTotal AmountContract ValueBalance Contract
ATotal of A from Above ( i want result here) Fix amountContract Value - Total Amount
BTotal of b from AboveFix amountContract Value - Total Amount
CTotal of c from AboveFix amountContract Value - Total Amount
DTotal of d from AboveFix amountContract Value - Total Amount
 
Upvote 0
as you have 365
you could use
in column A
=UNIQUE(FILTER(A:A,A:A<>""))
to get all the unique vendor names form your 1000's rows

Book4
ABCDEFG
1Vendor nameAmountVendor nameTotal
2A100A1000
3B200B200
4C300C300
5A250D450
6A450E400
7D450G400
8E400
9G400
10a200
11
Sheet1
Cell Formulas
RangeFormula
E1:E7E1=UNIQUE(FILTER(A:A,A:A<>""))
F2:F7F2=SUMIF(A:A,E2,B:B)
Dynamic array formulas.
 
Upvote 0
total of each vendor in separate sheet.
VBA Code:
Sub test()
    Dim a
    Dim i&
    a = Cells(1).CurrentRegion
    With CreateObject("scripting.dictionary")
        For i = 2 To UBound(a)
            If Not .exists(a(i, 1)) Then
                .Add a(i, 1), a(i, 2)
            Else
                .Item(a(i, 1)) = .Item(a(i, 1)) + a(i, 2)
            End If
        Next
        For Each k In .keys
            Sheets.Add.Name = k
            Cells(1, 1).Resize(, 2) = Array(a(1, 1), a(1, 2))
            Cells(2, 1).Resize(, 2) = Array(k, .Item(k))
        Next
    End With
End Sub
 
Upvote 0
we using office 365

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Another means to the end is with Power Query

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Amount", Int64.Type}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Vendor name"}, {{"Total", each List.Sum([Amount]), type nullable number}})
in
    #"Grouped Rows"

Book7
ABCDE
1Vendor nameAmountVendor nameTotal
2A100A800
3B200B200
4C300C300
5A250D450
6A450E400
7D450G400
8E400a200
9G400
10a200
Sheet1
 
Upvote 0

Forum statistics

Threads
1,215,165
Messages
6,123,390
Members
449,098
Latest member
ArturS75

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top