Help summing random numbers of cells.

M

Matt

First off, I am not an accounting pro or an Excel daily user so please adjust your answers accordingly

I keep a monthly expense sheet for my business based on the date of the expense not the vendor. Headers are as follows

date vendor itemized item purchased cost/item item count total cost of item total cost of orde

Right now I input the date, vendor and first item purchased, cost/1, and calculate the total cost of the line item for each line from the vendor. I only put the vendor name in one time for each order even though I have multiple line items from the vendor. When I enter the last line item I hand calc the total cost of the order

My question is as follows

How do I tell Excel to write a formula to calc the total cost of the order? It will need to either look for a vendor change if only a single line item is entered or it will need to look for a vendor change and the back up to the cell above which would be empty and then total from the last vendor to the last blank vendor line in that set.

Will Excel do this

Thanks Matt
 
H

Harlan Grove

...
...
I keep a monthly expense sheet for my business based on the date of the
expense not the vendor. Headers are as follows:

date vendor itemized item purchased cost/item item count
total cost of item total cost of order

Right now I input the date, vendor and first item purchased, cost/1, and
calculate the total cost of the line item for each line from the vendor.
I only put the vendor name in one time for each order even though I have
multiple line items from the vendor. When I enter the last line item I
hand calc the total cost of the order.
...

If you mean you leave the date and vendor columns blank for second and
subsequent items from the same order and all cells below the final line entry
from the most recent order are also blank, then you could calculate the total
cost of an order using a single formula copied into all cells in the 'total cost
of order' column.

If your order table were in columns A through G with column headers in row 1 and
top line entry from your first order in row 2, then enter the following formula
in cell G2 (the total cost of order column for the topmost line entry).

G2:
=F2+IF(ISBLANK(A3),G3,0)

Then supplement this with conditional formatting. The conditional formatting
*FORMULA* for cell G2 would be =LEN(TRIM(A2))=0 and the format used when this
condition is met would be text color the same as cell background color, usually
white. This hides intermediate sums and displays only the total cost on the
first line of each order.
 
M

Matt

Harlan, thanks for the help. You really did understand what I was asking for. Could you email me, I have one last question and it is much easier to track and email than this site.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top