Hello all,
I would appreciate your help with a problem I'm having.
I have a spreadsheet with the sales info of different stores, including location of the store, time of sale, and amount. Data for all stores and sales is in one spreadsheet.
The sales are sorted by date, in a chronological order (older sales on a higher row, etc.). What I'm trying to do is to create a new column, in which next to each sale we will see the total sales in the store (including the current sale). Obviously, we need to condition the total sales to be calculated for each store separately.
I've tried doing so by using the sumif and sumifs, but couldn't get it right .
Since it's a bit hard to explain, I've uploaded this file:
http://dl.dropbox.com/u/7112203/Question-excel.xlsx
You can see the info for two stores (one in London and one in Sheffield), and on column E I calculated what I'm trying to achieve in my head.
Your help would be very appreciated,
Thank you in advance
In cell E2, paste:
then autofill down.=SUMIF($A$2:A2,A2,$D$2:D2)
Cheers,
“To sin by silence when they should protest makes cowards of men.” ~ Abraham Lincoln
In F2 and copy down,
=E2 + IF(A2=A1, N(F1))
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
If the first row is a header (i.e., text), then you can't add the text to the number at left; you get an error. The N function returns numbers unchanged, but converts text to 0.
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
Put some text in F1 and try the formula in F2 with and without the N function. Watch it evaluate with the Evaluate Formula button.
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
follow up question, if you don't mind:
how do I find, for each unique store, the time of the earliest sale? There is no "minif" function.
This is a nice vid, but doesn't cover exactly what I need: http://www.youtube.com/user/ExcelIsF.../0/Ci4ahcW1NbM
Thanks
Please take a few minutes to read the forum rules about cross-posting.
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks