mardi 7 juillet 2015

Using sumif to calculate sum of orders between 2 calculated dates

I have created a spreadsheet which contains all of my sales/expenses. On the overview sheet, I wish to be able to view current income for the day, week, month, quarter and year. I have calculated the start and end dates for each of these using a calculation based on (Today) so they auto populate.

I have managed to get today to work using the code: =SUMIF(Sheet1!A:A,Overview!J2,Sheet1!J:J)

Where sheet1!A:A is my date list, overview is "=today()" and J:J is the list of numbers to add.

This works perfectly, but when trying to add all sales between 2 dates, ie weeks sales, I am getting an error that Ive entered too few arguments for this function.

I have start date and end date calculated by now functions. My code is as follows: =sumifs(Sheet1!J:J,">=J3",Sheet1!A:A,"<=J4")

SHeet1 J:J is the range of the items that need adding Sheet1 A:A is the range for the dates J3 is the start date J4 is the end date.

Im not sure how to add an example of my spread sheet but I would be happy to do so if it helps.

Aucun commentaire:

Enregistrer un commentaire