Multiple if criteria in one statement (if/sumproduct)
Hello. I am having a problem with extremely long formulas, and I was 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 entered into the spreadsheet. I am currently trying to gather all the data that was entered on Mondays. ie. The dates 38719, 38726, 38733, 38740, 38747, and 38754 (all the Monday dates in 2006). I am currently using sumproduct formulas to determine the dollar value of items entered on Mondays, are a certain type of item, and another 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 curious if there is any way to be able to put the range of above Monday dates into a single criteria field of the sumproduct formula. I would also love to know if there is another way of doing this without using sumproduct. Thanks much! Nick -- thekovinc ------------------------------------------------------------------------ thekovinc's Profile: http://www.excelforum.com/member.php...o&userid=29378 View this thread: http://www.excelforum.com/showthread...hreadid=513783 |
Multiple if criteria in one statement (if/sumproduct)
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),ran ge_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 |
Multiple if criteria in one statement (if/sumproduct)
you can use the WEEKDAY function so you don't need a range.
=SUMPRODUCT(--(WEEKDAY(A1:A10)=2),B1:B10) "thekovinc" wrote: Hello. I am having a problem with extremely long formulas, and I was 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 entered into the spreadsheet. I am currently trying to gather all the data that was entered on Mondays. ie. The dates 38719, 38726, 38733, 38740, 38747, and 38754 (all the Monday dates in 2006). I am currently using sumproduct formulas to determine the dollar value of items entered on Mondays, are a certain type of item, and another 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 curious if there is any way to be able to put the range of above Monday dates into a single criteria field of the sumproduct formula. I would also love to know if there is another way of doing this without using sumproduct. Thanks much! Nick -- thekovinc ------------------------------------------------------------------------ thekovinc's Profile: http://www.excelforum.com/member.php...o&userid=29378 View this thread: http://www.excelforum.com/showthread...hreadid=513783 |
Multiple if criteria in one statement (if/sumproduct)
Thanks a lot! -- thekovinc ------------------------------------------------------------------------ thekovinc's Profile: http://www.excelforum.com/member.php...o&userid=29378 View this thread: http://www.excelforum.com/showthread...hreadid=513783 |
All times are GMT +1. The time now is 02:40 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com