Invoice
establish 3 named ranges on your sheet
"Total", "TaxRate", "ItemType"(column in invoice)
Macro code:
Dim c as range
dim subtotals (1 to 3)
for each c in activesheet.range("ItemType")
select case c.value
case "Taxable"
subtotals (1) = subtotals (1) + c.offset (0,2).value
case "Non-Taxable"
subtotals (2) = subtotals (2) + c.offset (0,2).value
case "Labor"
subtotals (3) = subtotals (3) + c.offset (0,2).value
case else
if not c.value = "" then
msgbox "Improper Item Clasification - " & c.address
end if
end select
activesheet.Range("Total").value = _
subtotals(1) * activesheet.range("TaxRate") + subtotals(2) +subtotals(3)
"selwonk" wrote:
I am trying to setup an invoice for work and need a little assitance. I
apologise for my ignorance in the following matter. I need some direction in
how to set up a formula for the following. I have three catagories, taxable,
non taxable and labor.
How do you direct each catagory to different locations for the exact total.
The taxable items need to be added together then mutiplied by the tax rate
after wich needs to be added to the total labor cost and non taxable items.
I appreciate any help and guidence on the matter
|