Invoicing

Rob #4

Board Regular
Joined
Jun 19, 2003
Messages
194
I am trying to figure out a way to sort this information by Description, so that I can compare Rates easily. However as time goes on I will need to add more invoices to this worksheet and will need those items added to the summary also. I am trying to do the summary on another worksheet. Any ideas?
National Waterworks Invoice Summary.xls
ABCDEF
23DateInvoice #DescriptionQtyRateTotal
2412/5/2005301146116 TJ CL52 DI PIPE C/L108$33.48$3,615.84
2512/5/2005301146116 EJIW GATE VLV RW OR1$3,355.00$3,355.00
2612/5/200530114615668S 2 CI CLEVE VLV BOX COMP1$75.00$75.00
2712/5/2005301146116 MJ 45 BEND C/L CP DI C1531$355.00$355.00
2812/5/2005301146116 MJ 22-1/2 BEND C/L CP DI C1532$354.50$709.00
2912/5/2005301146116 MJ 11-1/4 BEND C/L CP DI C1531$356.00$356.00
3012/5/2005301146116 MJ L/P SLEEVE CP DI C1531$287.50$287.50
3112/5/2005301146116 MJ ACC SET L/ GLAND12$0.00$0.00
3212/5/2005301146116 FIELD LOCK GASKET3$241.05$723.15
33Sales Tax$710.74
34Total$10,187.23
35
3612/8/2005303550312 ONE-LOK DI RESTRAINT SLD128$48.00$384.00
3712/8/2005303550312 MJ ACC SET L/ GLAND8$0.00$0.00
3812/8/2005303550312 MJ L/P SLEEVE CP DI C1534$113.19$452.76
39Sales Tax$52.30
40Total$889.06
41
4212/12/2005303994712 ONE-LOK DI RESTRAINT SLD121$48.00$48.00
4312/12/2005303994712 MJ ACC SET L/ GLAND2$0.00$0.00
4412/12/2005303994712 MJ CAP T/C CP DI C1531$59.78$59.78
4512/12/2005303994712 MJ PLUG T/C CP DI C1531$60.76$60.76
46Sales Tax$12.64
47Total$181.18
IX Invoice Data
 
OK,

Here's some code for you. It will compile your invoices into a summary sheet, sort & subtotal:

<font face=tahoma><SPAN style="color:#00007F">Sub</SPAN> CreateSummary()
    <SPAN style="color:#00007F">Dim</SPAN> LR <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, i <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
    
        <SPAN style="color:#007F00">'   Create a Summary sheet from the activesheet</SPAN>
        ActiveSheet.Copy After:=Sheets(Sheets.Count)
        <SPAN style="color:#007F00">'   Rename the new sheet</SPAN>
        ActiveSheet.Name = "Summary"
        
        LR = Range("C65536").End(xlUp).Row
        <SPAN style="color:#007F00">'   Delete blank rows (Tax + Total)</SPAN>
        <SPAN style="color:#00007F">For</SPAN> i = LR <SPAN style="color:#00007F">To</SPAN> 1 <SPAN style="color:#00007F">Step</SPAN> -1
            <SPAN style="color:#00007F">If</SPAN> Cells(i, 1) = "" <SPAN style="color:#00007F">Then</SPAN> Cells(i, 1).EntireRow.Delete
        <SPAN style="color:#00007F">Next</SPAN> i
        
        <SPAN style="color:#007F00">'   Sort Summary & Subtotal</SPAN>
        <SPAN style="color:#00007F">With</SPAN> Range("C2")
            .Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
                OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
            .Subtotal GroupBy:=3, Function:=xlAverage, TotalList:=Array(4, 5, _
                6), Replace:=True, PageBreaks:=False, SummaryBelowData:=<SPAN style="color:#00007F">True</SPAN>
        <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN>
        
     Columns("C:C").EntireColumn.AutoFit
    
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>

Smitty
 
Upvote 0

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Forum statistics

Threads
1,215,523
Messages
6,125,323
Members
449,218
Latest member
Excel Master

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