Hi There,
Just need a more customized version of the vba from MrExcel-"Create An Invoice Register Podcast #1808".
This VBA tabulates data from an invoice to a separate worksheet. I.e. It pulls out information like Date, Invoice No, Customer Name and Invoice Amount an tabulates on another sheet.
where C4 is Date, C5 is Invoice NO., A10 is Customer and InvoiceTotal is Total.
This VBA records information from the invoice to a table like below:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Invoice NO.[/TD]
[TD]Customer[/TD]
[TD]Total[/TD]
[/TR]
</tbody>[/TABLE]
But I need the VBA to sort information into a table as below:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Invoice NO.[/TD]
[TD]Customer[/TD]
[TD]Non-Taxable Amount[/TD]
[TD]Taxable Amount[/TD]
[TD]Tax[/TD]
[TD]Total Amount[/TD]
[/TR]
</tbody>[/TABLE]
When customers are taxed, the InvoiceTotal is placed into Non-Taxable Amount Column, with the Taxable Amt and Taxes column empty. If the customer is not taxed, the Taxable amount and Taxes is recorded accordingly, with the Non-Taxable amount column empty. The total amount would simply be either the Non-Taxable Amount alone, or the Taxable Amount + Tax.
Is there a VBA that can sort cell values?
Much Thanks!
Just need a more customized version of the vba from MrExcel-"Create An Invoice Register Podcast #1808".
This VBA tabulates data from an invoice to a separate worksheet. I.e. It pulls out information like Date, Invoice No, Customer Name and Invoice Amount an tabulates on another sheet.
Code:
Sub PostToRegister()
Dim WS1 As Worksheet
Dim WS2 As Worksheet
Set WS1 = Worksheets("Invoice")
Set WS2 = Worksheets("Register")
' Figure out which row is the next row
NextRow = WS2.Cells(Rows.Count, 1).End(xlUp).Row + 1
' Write the important values to register
WS2.Cells(NextRow, 1).Resize(1, 7).Value = Array(WS1.Range("C4"), WS1.Range("C5"), _
WS1.Range("A10"), Range("InvoiceTotal"))
End Sub
where C4 is Date, C5 is Invoice NO., A10 is Customer and InvoiceTotal is Total.
This VBA records information from the invoice to a table like below:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Invoice NO.[/TD]
[TD]Customer[/TD]
[TD]Total[/TD]
[/TR]
</tbody>[/TABLE]
But I need the VBA to sort information into a table as below:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Invoice NO.[/TD]
[TD]Customer[/TD]
[TD]Non-Taxable Amount[/TD]
[TD]Taxable Amount[/TD]
[TD]Tax[/TD]
[TD]Total Amount[/TD]
[/TR]
</tbody>[/TABLE]
When customers are taxed, the InvoiceTotal is placed into Non-Taxable Amount Column, with the Taxable Amt and Taxes column empty. If the customer is not taxed, the Taxable amount and Taxes is recorded accordingly, with the Non-Taxable amount column empty. The total amount would simply be either the Non-Taxable Amount alone, or the Taxable Amount + Tax.
Is there a VBA that can sort cell values?
Much Thanks!