# IF Staement with list for dates

May 12, 2009 at 07:09:42
Specs: Windows XP
 Okay i am creating a database for people coutning, I am entering data on a daily basis, with a list for the day such as Monday, Tuesday etc. So at the end of the 30 days i want to see a total for each day such as all the mondays and all the tuedays. I wrote an if statment =IF(\$B4="Monday",C6,+IF(B14="Monday",C16+IF(B24="Monday",C26)))so basically B4 is where that days is (all Bs are days) and the C's are the value that i want added together if the day is monday! but since i am doing it for everyday and thus as soon as it says tuesday it becomes false and doesnt add the next monday. how do i get around it. I know a little complicated but was just wondering. PLease help! ( so basically i want to have all the mondays totals, and tuesday totals etc, calculated. Though obviously the first day in each month isnt a Monday so i though if statement was better)

See More: IF Staement with list for dates

#1
May 12, 2009 at 08:34:24
 Your looking for a =SUMIF solution.Try this:all Bs are days and the C's are the valueSo in Cell D1 will be your totals for all Mondays:=SUMIF(B1:B45,"Monday",C1:C45)Cell D2 will be your totals for Tuesday:=SUMIF(B1:B45,"Tuesday",C1:C45)Etc. Etc.I've only used from cell B/C 1 through B/C 45Modify to suit your needs.MIKE

Report •
Related Solutions