View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Eduardo Eduardo is offline
external usenet poster
 
Posts: 2,276
Default need help writing function

Hi,
Let's assume that you have a list of you days of the week in column C
starting in row 2, in column D enter

=SUMPRODUCT(($A$2:$A$100=C2)*($B$2:$B$100))

Copy formula down, change range to fit your needs

"LQQKB4uleep" wrote:

Column A has Days of the week listed for the entire month
Column B has data listed for days of the week
Want formula to count data in column B if it equals a certain day of the week

like if sunday then count all data listed for sundays in column B

"a" "B"
Sunday 21
Monday 15
Tuesday 28

Sunday 14
Monday 10
Tuesday 12

sunday=35
Monday=25
Tuesday=40