Multiple if criteria in one statement (if/sumproduct)

  • Thread starter Thread starter thekovinc
  • Start date Start date
T

thekovinc

Hello. I am having a problem with extremely long formulas, and I wa
wondering if there was any way to tidy them up a little bit.

I have a set of data that has a column with the date it was entere
into the spreadsheet. I am currently trying to gather all the dat
that was entered on Mondays.

ie. The dates 38719, 38726, 38733, 38740, 38747, and 38754 (all th
Monday dates in 2006).

I am currently using sumproduct formulas to determine the dollar valu
of items entered on Mondays, are a certain type of item, and anothe
criteria. So my formula currently looks like:

=sumproduct((Criteria 1)*(Criteria 2)*(Criteria 3), (Dollar Value))

This works fine for a range of dates or a single date, but I am curiou
if there is any way to be able to put the range of above Monday date
into a single criteria field of the sumproduct formula. I would als
love to know if there is another way of doing this without usin
sumproduct.

Thanks much!

Nic
 
The criteria for finding Mondays would be:

WEEKDAY(date_cell)= 2

as WEEKDAY returns 1 for Sunday, 2 for Monday etc.

You could use an array formula instead of SUMPRODUCT, along the lines
of:

=SUM(IF((criterion1)*(criterion2)*(criterion3),range_to_sum,0))

but it will be about as long as the SUMPRODUCT formula and will have to
be entered with CTRL-SHIFT-ENTER.

Hope this helps.

Pete
 
you can use the WEEKDAY function so you don't need a range.

=SUMPRODUCT(--(WEEKDAY(A1:A10)=2),B1:B10)
 

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

Back
Top