VLookup If Date is equal to the Day
1) Add a helper column next to the week day
Sunday 1
Monday 2
Tuesday 3
and so on.
I'm going to assume the helper column is G
=AVERAGE(IF(WEEKDAY(A2:A15)=G2,B2:B15))
The serial dates are in A2:A15 and the daily counts are in B2:B15. G2
contains the Weekday. Commit with CTRL SHIFT ENTER.
--
HTH,
Barb Reinhardt
"dandiehl" wrote:
I have a list that contains a number for each day of the year. Column A
contains the date and column B has the corresponding number of widgets. I
would like wrtie a formula that will return the year-to-date average number
of widgets by day. It might appear like this:
Day Avg Widgets
Sun 45
Mon 215
Tue 246
Wed 302
Thu 285
Fri 177
Sat 96
|