How to Get Number of Invoices each Vendor

aamirgee

New Member
Joined
Jul 3, 2023
Messages
18
Office Version
  1. 2021
Platform
  1. Windows
1729677659167.png

Hello! I want to count total Number of Invoices for each Vendors & also want to count how many invoices have payment method Cash, Transfer and Others.

Help me. (This is my 1st Question)
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Welcome to the MrExcel board!

It might help if we could copy your data for testing. MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in
(If you have trouble with XL2BB, review the "XL2BB Icons greyed out" link in the 'Known XL2BB issues' section near the top of the XL2BB Instructions page linked above.)

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.

In your image, the first 6 rows under the heading are all for 'Universal Computers' and all have the same invoice number. Do you want that counted as 6 for Universal Computers because there are 6 rows or do you want that counted as 1 because they are all the same invoice number?
 
Upvote 0
1729693028476.png

Formula in J1
Excel Formula:
=LET(ven,G2:G13,inv,A2:A13,met,H2:H13,x,UNIQUE(ven),zinv,BYROW(x,LAMBDA(ra,COUNTA(UNIQUE(FILTER(inv,ven=ra))))),zcash,BYROW(x,LAMBDA(ra,COUNTA(UNIQUE(FILTER(inv,(ven=ra)*(met="cash")))))),ztfr,BYROW(x,LAMBDA(ra,COUNTA(UNIQUE(FILTER(inv,(ven=ra)*(met="transfer")))))),hdr,{"Vendor","Invoice","Cash","Transfer"},VSTACK(hdr,HSTACK(x,zinv,zcash,ztfr)))
 
Upvote 0
View attachment 118427
Formula in J1
Excel Formula:
=LET(ven,G2:G13,inv,A2:A13,met,H2:H13,x,UNIQUE(ven),zinv,BYROW(x,LAMBDA(ra,COUNTA(UNIQUE(FILTER(inv,ven=ra))))),zcash,BYROW(x,LAMBDA(ra,COUNTA(UNIQUE(FILTER(inv,(ven=ra)*(met="cash")))))),ztfr,BYROW(x,LAMBDA(ra,COUNTA(UNIQUE(FILTER(inv,(ven=ra)*(met="transfer")))))),hdr,{"Vendor","Invoice","Cash","Transfer"},VSTACK(hdr,HSTACK(x,zinv,zcash,ztfr)))
I have tried your code as it but it is not working. please if you have sample workbook then send me.(Thanks)
 
Upvote 0
please if you have sample workbook then send me.
Instead of helpers here having to send you something, what about you send some samples as requested and answer the questions that have been asked?
 
Upvote 0
Instead of helpers here having to send you something, what about you send some samples as requested and answer the questions that have been asked?
The following is my sample sheet.
SAMPLE.xlsx
BCDEFGHIJKLMN
2DATEITEM DESCRIPTIONQTYRATETOTALVENDORP.METHODVENDOR# INVOICESCASHTRANSFER
303/06/2024HP Cartridge 912(BLK)1155.00155.00Universal ComputersCASH
403/06/2024HP Cartridge 912(CYN)178.0078.00Universal ComputersCASH
503/06/2024HP Cartridge 912(YLW)178.0078.00Universal ComputersCASH
603/06/2024HP Cartridge 912(MGN)178.0078.00Universal ComputersCASH
703/06/2024HP Cartridge 650(CLR)150.3150.31Universal ComputersCASH
803/06/2024HP Cartridge 650(BLK)157.2157.21Universal ComputersCASH
920/05/2024POSBYTZ Additional User for POS3450.001350.00MYTM Information Tech LLCTRANSFER
1023/06/2024HP Cartridge 912(BLK)1154.97154.97Universal ComputersCASH
1123/06/2024HP Cartridge 912(CYN)178.1978.19Universal ComputersCASH
1230/06/2024HDD CASE M.2 2 IN 1 MD08ME169.0069.00Universal ComputersCASH
1307/03/2024LAPTOP RAM DDR3 8GB1115.00115.00Universal ComputersCASH
1407/03/2024LAPTOP HP Ci7-1355 16GB/512SSD/13th Gen12650.002650.00Universal ComputersCASH
1509/09/2024POSBYTZ Billing Software 6 months11725.001725.00MYTM Information Tech LLCTRANSFER
1629/07/2024Microsoft Exchange Online (PLAN1)163.2563.25Modern Gates Co. Ltd.TRANSFERNow I want first filter Vendors and copy to K3. 2nd Number of Invoces for each Vendor. 3rd Number of Invoces in Cash OR Transfer
1709/09/2024Microsoft Exchange Online (PLAN1)134.5034.50Modern Gates Co. Ltd.TRANSFER
1826/09/2024PRINTER REPAIRING1270.00270.00Afzal Computers JeddahCASH
1926/09/2024EZI PRINT 150A TONER190.8590.85Afzal Computers JeddahCASH
2030/09/2024HP Cartridge 903(B)1185.00185.00Universal ComputersCASH
2130/09/2024HP Cartridge 903(Y)180.0080.00Universal ComputersCASH
2230/09/2024HP Cartridge 903(C)180.0080.00Universal ComputersCASH
2330/09/2024HP Cartridge 903(M)180.0080.00Universal ComputersCASH
2430/09/2024HP Cartridge 912(BLK)1149.50149.50Universal ComputersCASH
2530/09/2024HP Cartridge 912(CYN)178.2078.20Universal ComputersCASH
2630/09/2024HP Cartridge 912(YLW)178.2078.20Universal ComputersCASH
2730/09/2024HP Cartridge 912(MGN)178.2078.20Universal ComputersCASH
2830/09/2024PRINTCO TONER 17A BLK240.0080.00Universal ComputersCASH
2930/09/2024PRINTCO TONER 05A/80A139.8839.88Universal ComputersCASH
3015/10/2024Microsoft Exchange Online (PLAN1)113724.1013724.10Comlab Information TechnologyTRANSFER
3117/10/2024HP Cartridge 650(CLR)260.00120.00Aalam Bila HadoodCASH
3217/10/2024HP Cartridge 650(BLK)165.0065.00Aalam Bila HadoodCASH
Sample
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A15:H32Expression=$A15<>""textYES
A3:H14Expression=$A3<>""textNO
 
Upvote 0
You can try :
Book3
BCDEFGHIJKLMN
2DATEITEM DESCRIPTIONQTYRATETOTALVENDORP.METHODVENDOR# INVOICESCASHTRANSFER
303/06/2024HP Cartridge 912(BLK)1155155Universal ComputersCASHAalam Bila Hadood22
403/06/2024HP Cartridge 912(CYN)17878Universal ComputersCASHAfzal Computers Jeddah22
503/06/2024HP Cartridge 912(YLW)17878Universal ComputersCASHComlab Information Technology11
603/06/2024HP Cartridge 912(MGN)17878Universal ComputersCASHModern Gates Co. Ltd.22
703/06/2024HP Cartridge 650(CLR)150.3150.31Universal ComputersCASHMYTM Information Tech LLC22
803/06/2024HP Cartridge 650(BLK)157.2157.21Universal ComputersCASHUniversal Computers2121
920/05/2024POSBYTZ Additional User for POS34501350MYTM Information Tech LLCTRANSFERTOTAL30255
1023/06/2024HP Cartridge 912(BLK)1154.97154.97Universal ComputersCASH
1123/06/2024HP Cartridge 912(CYN)178.1978.19Universal ComputersCASH
1230/06/2024HDD CASE M.2 2 IN 1 MD08ME16969Universal ComputersCASH
1307/03/2024LAPTOP RAM DDR3 8GB1115115Universal ComputersCASH
1407/03/2024LAPTOP HP Ci7-1355 16GB/512SSD/13th Gen126502650Universal ComputersCASH
1509/09/2024POSBYTZ Billing Software 6 months117251725MYTM Information Tech LLCTRANSFER
1629/07/2024Microsoft Exchange Online (PLAN1)163.2563.25Modern Gates Co. Ltd.TRANSFER
1709/09/2024Microsoft Exchange Online (PLAN1)134.534.5Modern Gates Co. Ltd.TRANSFER
1826/09/2024PRINTER REPAIRING1270270Afzal Computers JeddahCASH
1926/09/2024EZI PRINT 150A TONER190.8590.85Afzal Computers JeddahCASH
2030/09/2024HP Cartridge 903(B)1185185Universal ComputersCASH
2130/09/2024HP Cartridge 903(Y)18080Universal ComputersCASH
2230/09/2024HP Cartridge 903(C)18080Universal ComputersCASH
2330/09/2024HP Cartridge 903(M)18080Universal ComputersCASH
2430/09/2024HP Cartridge 912(BLK)1149.5149.5Universal ComputersCASH
2530/09/2024HP Cartridge 912(CYN)178.278.2Universal ComputersCASH
2630/09/2024HP Cartridge 912(YLW)178.278.2Universal ComputersCASH
2730/09/2024HP Cartridge 912(MGN)178.278.2Universal ComputersCASH
2830/09/2024PRINTCO TONER 17A BLK24080Universal ComputersCASH
2930/09/2024PRINTCO TONER 05A/80A139.8839.88Universal ComputersCASH
3015/10/2024Microsoft Exchange Online (PLAN1)11372413724Comlab Information TechnologyTRANSFER
3117/10/2024HP Cartridge 650(CLR)260120Aalam Bila HadoodCASH
3217/10/2024HP Cartridge 650(BLK)16565Aalam Bila HadoodCASH
Sheet1
Cell Formulas
RangeFormula
K3:N8K3=LET(vend_list,G3:G32,vendor,SORT(UNIQUE(vend_list)),Pay_Method,H3:H32,HSTACK(vendor,COUNTIF(vend_list,vendor),COUNTIFS(vend_list,vendor,Pay_Method,M2),COUNTIFS(vend_list,vendor,Pay_Method,N2)))
L9:N9L9=SUM(L3:L8)
Dynamic array formulas.
 
Upvote 0
The following is my sample sheet.
Thanks for getting XL2BB going and providing some sample data. I'm wondering why it is missing column A. Isn't that an important column in relation to your question?

Also, unless your question has now been resolved, it might help if you addressed my earlier question ..
In your image, the first 6 rows under the heading are all for 'Universal Computers' and all have the same invoice number. Do you want that counted as 6 for Universal Computers because there are 6 rows or do you want that counted as 1 because they are all the same invoice number?
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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