List Invoices w/ Description for CustID

gtd526

Well-known Member
Joined
Jul 30, 2013
Messages
657
Office Version
  1. 2019
Platform
  1. Windows
Hello,
Trying to list all invoices per CustID(K2) with each Description(E:E) on the invoice (can be multiple descriptions per invoice).
Below are the results I have so far, but its not listing correctly when I change to CustID.
The first example is how it should look when completed. When I change the CustID it changes incorrectly. See additional examples below.
See J:J for the summary, which is what I want to correct.
Thank you.

Correct:
Create Invoice.xlsm
ABCDEFGHIJKLM
1InvoiceCust IDNameAddressDescriptionQuantitySubtotalGrand TotalList of Invoices by Cust ID
21gredowGreg Downs3090 N Course Dr #910Tile - Installation1$15,000.00$15,000.00Cust ID:joebla
32joeblaJoe Black123 Main StDoor Hinge1$100.00$100.00Address:123 Main StCorrect
43gredowGreg DownsDoor Insulation1$200.00$200.00
54gredowGreg DownsReplace Tile1$5,000.00$5,000.00CountInvoice(s)SummaryPrice
65gredowGreg DownsCeiling Fan1$356.75$356.7512Door Hinge$100.00
76joeblaJoe BlackInstall Lighting1$250.00$250.0036Install Lighting$600.00
86joeblaJoe BlackCabinets2$100.00$200.00  Cabinets 
96joeblaJoe BlackBed21$150.00$150.00  Bed2 
107gredowGreg DownsFloor1$25.00$25.0028Walls$720.00
117gredowGreg DownsCeiling1$300.00$300.00  Floor Rug 
128joeblaJoe BlackWalls2$120.00$240.0029Patch Walls$450.00
138joeblaJoe BlackFloor Rug3$160.00$480.00  Thin Set Grout 
149joeblaJoe BlackPatch Walls1$200.00$200.00210Lights$350.00
159joeblaJoe BlackThin Set Grout1$250.00$250.00  Ceiling 
1610joeblaJoe BlackLights1$300.00$300.00111help$25.00
1710joeblaJoe BlackCeiling2$50.00$100.00    
1811joeblaJoe Blackhelp1$25.00$25.00    
1912jasbloJas BlowKitchen1$65.00$65.00    
2013jasbloJas BlowCarpet2$100.00$200.00    
2113jasbloJas BlowBlinds1$130.00$130.00Total:$2,245.00
Test
Cell Formulas
RangeFormula
K3K3=IFERROR(INDEX(Details!D:D,MATCH(Details!K2,Details!B:B,0)),"")
I6:I20I6=IF(ISNUMBER(J6),COUNTIFS($A$1:$A$99, $J6),"")
J6:J20J6=IF(ISNUMBER(M6),INDEX($A:$A, MATCH(0, IF($K$2=$B:$B, COUNTIF($J$5:$J5, $A:$A), ""), 0)),"")
K6:K20K6=IFERROR(IF(COUNTIF($A$1:$A$99, $J6)=1,INDEX($E$2:$E$99,AGGREGATE(15,6,(ROW($E$2:$E$99)-ROW($E$2)+1)/($J6=$A$2:$A$99)/(ISNA(MATCH($E$2:$E$99,K$5:K5,0))),1)),INDEX($E$2:$E$99,AGGREGATE(15,6,(ROW($E$2:$E$99)-ROW($E$2)+1)/(LOOKUP(2,1/($J$6:J6<>""),$J$6:J6)=$A$2:$A$99)/(ISNA(MATCH($E$2:$E$99,K$5:K5,0))),1))),"")
A18:A20,A16,A14,A3:A7A3=A2+1
B2:B21B2=LOWER(LEFT(C2,3)&MID(C2,FIND(" ",C2)+1,3))
H2:H21H2=F2*G2
M6:M7M6=IFERROR(IF(COUNTIFS($A:$A, $J6,$A:$A,"<>")>=2,SUMIF(A:A,$J6,H:H),INDEX(G:G,MATCH(J6,A:A,0))),"")
M11:M20,M8:M9M8=IFERROR(IF(COUNTIFS($A:$A, $J8,$A:$A,"<>")>=2,SUMIF(A:A,$J8,G:G),(INDEX(G:G,MATCH(J8,A:A,0)))),"")
M10M10=IFERROR(IF(COUNTIFS($A:$A, $J10,$A:$A,"<>")>=2,SUMIF(A:A,$J10,H:H),INDEX(H:H,MATCH(J10,A:A,0))),"")
M21M21=SUM(IF(ISERROR(M6:M20),"",M6:M20))
Press CTRL+SHIFT+ENTER to enter array formulas.

Incorrect:
Create Invoice.xlsm
ABCDEFGHIJKLM
1InvoiceCust IDNameAddressDescriptionQuantitySubtotalGrand TotalList of Invoices by Cust ID
21gredowGreg Downs3090 N Course Dr #910Tile - Installation1$15,000.00$15,000.00Cust ID:gredow
32joeblaJoe Black123 Main StDoor Hinge1$100.00$100.00Address:123 Main StIncorrect
43gredowGreg DownsDoor Insulation1$200.00$200.00
54gredowGreg DownsReplace Tile1$5,000.00$5,000.00CountInvoice(s)SummaryPrice
65gredowGreg DownsCeiling Fan1$356.75$356.7511Tile - Installation$15,000.00
76joeblaJoe BlackInstall Lighting1$250.00$250.0013Door Insulation$200.00
86joeblaJoe BlackCabinets2$100.00$200.00    
96joeblaJoe BlackBed21$150.00$150.00    
107gredowGreg DownsFloor1$25.00$25.0014Replace Tile$5,000.00
117gredowGreg DownsCeiling1$300.00$300.00    
128joeblaJoe BlackWalls2$120.00$240.0015Ceiling Fan$356.75
138joeblaJoe BlackFloor Rug3$160.00$480.00    
149joeblaJoe BlackPatch Walls1$200.00$200.0027Floor$325.00
159joeblaJoe BlackThin Set Grout1$250.00$250.00  Ceiling 
1610joeblaJoe BlackLights1$300.00$300.00    
1710joeblaJoe BlackCeiling2$50.00$100.00    
1811joeblaJoe Blackhelp1$25.00$25.00    
1912jasbloJas BlowKitchen1$65.00$65.00    
2013jasbloJas BlowCarpet2$100.00$200.00    
2113jasbloJas BlowBlinds1$130.00$130.00Total:$20,881.75
Test
Cell Formulas
RangeFormula
K3K3=IFERROR(INDEX(Details!D:D,MATCH(Details!K2,Details!B:B,0)),"")
I6:I20I6=IF(ISNUMBER(J6),COUNTIFS($A$1:$A$99, $J6),"")
J6:J20J6=IF(ISNUMBER(M6),INDEX($A:$A, MATCH(0, IF($K$2=$B:$B, COUNTIF($J$5:$J5, $A:$A), ""), 0)),"")
K6:K20K6=IFERROR(IF(COUNTIF($A$1:$A$99, $J6)=1,INDEX($E$2:$E$99,AGGREGATE(15,6,(ROW($E$2:$E$99)-ROW($E$2)+1)/($J6=$A$2:$A$99)/(ISNA(MATCH($E$2:$E$99,K$5:K5,0))),1)),INDEX($E$2:$E$99,AGGREGATE(15,6,(ROW($E$2:$E$99)-ROW($E$2)+1)/(LOOKUP(2,1/($J$6:J6<>""),$J$6:J6)=$A$2:$A$99)/(ISNA(MATCH($E$2:$E$99,K$5:K5,0))),1))),"")
A18:A20,A16,A14,A3:A7A3=A2+1
B2:B21B2=LOWER(LEFT(C2,3)&MID(C2,FIND(" ",C2)+1,3))
H2:H21H2=F2*G2
M6:M7M6=IFERROR(IF(COUNTIFS($A:$A, $J6,$A:$A,"<>")>=2,SUMIF(A:A,$J6,H:H),INDEX(G:G,MATCH(J6,A:A,0))),"")
M11:M20,M8:M9M8=IFERROR(IF(COUNTIFS($A:$A, $J8,$A:$A,"<>")>=2,SUMIF(A:A,$J8,G:G),(INDEX(G:G,MATCH(J8,A:A,0)))),"")
M10M10=IFERROR(IF(COUNTIFS($A:$A, $J10,$A:$A,"<>")>=2,SUMIF(A:A,$J10,H:H),INDEX(H:H,MATCH(J10,A:A,0))),"")
M21M21=SUM(IF(ISERROR(M6:M20),"",M6:M20))
Press CTRL+SHIFT+ENTER to enter array formulas.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Using Power Query and a Parameter Look up, I have created a means for you to filter on whichever customer ID you would like. It can be found on box.net. Instructions on how to filter are in the file. You will need to create two queries and link them appropriately. Look at my signature if you are unfamiliar with Power Query

 
Upvote 0
Using Power Query and a Parameter Look up, I have created a means for you to filter on whichever customer ID you would like. It can be found on box.net. Instructions on how to filter are in the file. You will need to create two queries and link them appropriately. Look at my signature if you are unfamiliar with Power Query

the "Box.net" is asking for a monthly fee, which I'm not interested to do. Customers will be added, etc, and I what it to look like my first example.
Thank you for the reply.
 
Upvote 0
Not sure why Box.net would ask for a monthly fee unless you opted for one of the advanced features. I don't pay anything and have been using it for over 10 years. Sorry, what you are asking for requires very special VBA skills which are not in my wheelhouse. It is obviously a case of form over substance. Good Luck.
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,643
Members
449,093
Latest member
Ahmad123098

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