+ Reply to Thread
Results 1 to 28 of 28

average based on weekday

  1. #1
    Max
    Guest

    Re: average based on weekday

    > Be content in that the concept was the best though <g>

    Thanks for the view ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  2. #2
    Bernie Deitrick
    Guest

    Re: average based on weekday

    Nick,

    For the weekend average,

    =SUMPRODUCT((WEEKDAY(A1:A365,2)>5)*B1:B365)/SUMPRODUCT((WEEKDAY(A1:A365,2)>5)*1)

    For the weekday average
    =SUMPRODUCT((WEEKDAY(A1:A365,2)<6)*B1:B365)/SUMPRODUCT((WEEKDAY(A1:A365,2)<6)*1)

    HTH,
    Bernie
    MS Excel MVP


    "Nick" <[email protected]> wrote in message
    news:[email protected]...
    > I'm trying to average a column of numbers based on the day of the week.
    > Col A has the sequential days of the month, Col B has a number for each day.
    > I want to average all the numbers in Col B that are based on a weekday or
    > weekend.
    > --
    > Thanks,
    > Nick




  3. #3
    Bob Phillips
    Guest

    Re: average based on weekday

    Weekends: =SUMPRODUCT(--(WEEKDAY(A2:A10,2)>5),B2:B10)
    Weekdays: =SUMPRODUCT(--(WEEKDAY(A2:A10,2)<=5),B2:B10)

    --
    HTH

    Bob Phillips

    "Nick" <[email protected]> wrote in message
    news:[email protected]...
    > I'm trying to average a column of numbers based on the day of the week.
    > Col A has the sequential days of the month, Col B has a number for each

    day.
    > I want to average all the numbers in Col B that are based on a weekday or
    > weekend.
    > --
    > Thanks,
    > Nick




  4. #4
    Max
    Guest

    Re: average based on weekday

    Try, array-entered, i.e. press CTRL+SHIFT+ENTER:

    For weekdays:
    =AVERAGE(IF(WEEKDAY(A1:A8,2)={1,2,3,4,5},B1:B8))

    For weekends:
    =AVERAGE(IF(WEEKDAY(A1:A8,2)={6,7},B1:B8))

    Adapt the ranges to suit ..
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Nick" <[email protected]> wrote in message
    news:[email protected]...
    > I'm trying to average a column of numbers based on the day of the week.
    > Col A has the sequential days of the month, Col B has a number for each

    day.
    > I want to average all the numbers in Col B that are based on a weekday or
    > weekend.
    > --
    > Thanks,
    > Nick




  5. #5
    Bob Phillips
    Guest

    Re: average based on weekday

    hey Max,

    Greeting from Wessex

    The best part is that you used the ,2 argument to make the list simpler, but
    stopped one step short

    =AVERAGE(IF(WEEKDAY(A1:A8,2)={1,2,3,4,5},B1:B8))

    which I think is as previous.

    Be content in that the concept was the best though <g>

    Bob

    "Max" <[email protected]> wrote in message
    news:%[email protected]...
    > "Bob Phillips" wrote
    > > I like this answer best Max, but haven't we been here before
    > > =AVERAGE(IF(WEEKDAY(A1:A8,2)<=5,B1:B8))
    > > <EVBG>

    >
    > Yes (scratch-scratch) I vaguely recollect .. the conditional formatting
    > episode ? <bg>. Heck, it's now confirmed as one of my several blind

    spots:
    > that 1 week = 7 days only, Bob ! Cheers.
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    >
    >




  6. #6
    Nick
    Guest

    Re: average based on weekday

    WOW, three great answers with three different approachs and in such a short
    time.

    Thank you ever so much,
    Nick


    "Max" wrote:

    > Try, array-entered, i.e. press CTRL+SHIFT+ENTER:
    >
    > For weekdays:
    > =AVERAGE(IF(WEEKDAY(A1:A8,2)={1,2,3,4,5},B1:B8))
    >
    > For weekends:
    > =AVERAGE(IF(WEEKDAY(A1:A8,2)={6,7},B1:B8))
    >
    > Adapt the ranges to suit ..
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    > "Nick" <[email protected]> wrote in message
    > news:[email protected]...
    > > I'm trying to average a column of numbers based on the day of the week.
    > > Col A has the sequential days of the month, Col B has a number for each

    > day.
    > > I want to average all the numbers in Col B that are based on a weekday or
    > > weekend.
    > > --
    > > Thanks,
    > > Nick

    >
    >
    >


  7. #7
    Bob Phillips
    Guest

    Re: average based on weekday

    I like this answer best Max, but haven't we been here before

    =AVERAGE(IF(WEEKDAY(A1:A8,2)<=5,B1:B8))

    <EVBG>

    Bob

    "Max" <[email protected]> wrote in message
    news:[email protected]...
    > Try, array-entered, i.e. press CTRL+SHIFT+ENTER:
    >
    > For weekdays:
    > =AVERAGE(IF(WEEKDAY(A1:A8,2)={1,2,3,4,5},B1:B8))
    >
    > For weekends:
    > =AVERAGE(IF(WEEKDAY(A1:A8,2)={6,7},B1:B8))
    >
    > Adapt the ranges to suit ..
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    > "Nick" <[email protected]> wrote in message
    > news:[email protected]...
    > > I'm trying to average a column of numbers based on the day of the week.
    > > Col A has the sequential days of the month, Col B has a number for each

    > day.
    > > I want to average all the numbers in Col B that are based on a weekday

    or
    > > weekend.
    > > --
    > > Thanks,
    > > Nick

    >
    >




  8. #8
    Max
    Guest

    Re: average based on weekday

    You're welcome !
    Thanks for the feedback (from us <g>) ..
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Nick" <[email protected]> wrote in message
    news:[email protected]...
    > WOW, three great answers with three different approachs
    > and in such a short time.
    >
    > Thank you ever so much,
    > Nick




  9. #9
    Max
    Guest

    Re: average based on weekday

    "Bob Phillips" wrote
    > I like this answer best Max, but haven't we been here before
    > =AVERAGE(IF(WEEKDAY(A1:A8,2)<=5,B1:B8))
    > <EVBG>


    Yes (scratch-scratch) I vaguely recollect .. the conditional formatting
    episode ? <bg>. Heck, it's now confirmed as one of my several blind spots:
    that 1 week = 7 days only, Bob ! Cheers.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  10. #10
    Bob Phillips
    Guest

    Re: average based on weekday

    I like this answer best Max, but haven't we been here before

    =AVERAGE(IF(WEEKDAY(A1:A8,2)<=5,B1:B8))

    <EVBG>

    Bob

    "Max" <[email protected]> wrote in message
    news:[email protected]...
    > Try, array-entered, i.e. press CTRL+SHIFT+ENTER:
    >
    > For weekdays:
    > =AVERAGE(IF(WEEKDAY(A1:A8,2)={1,2,3,4,5},B1:B8))
    >
    > For weekends:
    > =AVERAGE(IF(WEEKDAY(A1:A8,2)={6,7},B1:B8))
    >
    > Adapt the ranges to suit ..
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    > "Nick" <[email protected]> wrote in message
    > news:[email protected]...
    > > I'm trying to average a column of numbers based on the day of the week.
    > > Col A has the sequential days of the month, Col B has a number for each

    > day.
    > > I want to average all the numbers in Col B that are based on a weekday

    or
    > > weekend.
    > > --
    > > Thanks,
    > > Nick

    >
    >




  11. #11
    Bernie Deitrick
    Guest

    Re: average based on weekday

    Nick,

    For the weekend average,

    =SUMPRODUCT((WEEKDAY(A1:A365,2)>5)*B1:B365)/SUMPRODUCT((WEEKDAY(A1:A365,2)>5)*1)

    For the weekday average
    =SUMPRODUCT((WEEKDAY(A1:A365,2)<6)*B1:B365)/SUMPRODUCT((WEEKDAY(A1:A365,2)<6)*1)

    HTH,
    Bernie
    MS Excel MVP


    "Nick" <[email protected]> wrote in message
    news:[email protected]...
    > I'm trying to average a column of numbers based on the day of the week.
    > Col A has the sequential days of the month, Col B has a number for each day.
    > I want to average all the numbers in Col B that are based on a weekday or
    > weekend.
    > --
    > Thanks,
    > Nick




  12. #12
    Bob Phillips
    Guest

    Re: average based on weekday

    Weekends: =SUMPRODUCT(--(WEEKDAY(A2:A10,2)>5),B2:B10)
    Weekdays: =SUMPRODUCT(--(WEEKDAY(A2:A10,2)<=5),B2:B10)

    --
    HTH

    Bob Phillips

    "Nick" <[email protected]> wrote in message
    news:[email protected]...
    > I'm trying to average a column of numbers based on the day of the week.
    > Col A has the sequential days of the month, Col B has a number for each

    day.
    > I want to average all the numbers in Col B that are based on a weekday or
    > weekend.
    > --
    > Thanks,
    > Nick




  13. #13
    Max
    Guest

    Re: average based on weekday

    Try, array-entered, i.e. press CTRL+SHIFT+ENTER:

    For weekdays:
    =AVERAGE(IF(WEEKDAY(A1:A8,2)={1,2,3,4,5},B1:B8))

    For weekends:
    =AVERAGE(IF(WEEKDAY(A1:A8,2)={6,7},B1:B8))

    Adapt the ranges to suit ..
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Nick" <[email protected]> wrote in message
    news:[email protected]...
    > I'm trying to average a column of numbers based on the day of the week.
    > Col A has the sequential days of the month, Col B has a number for each

    day.
    > I want to average all the numbers in Col B that are based on a weekday or
    > weekend.
    > --
    > Thanks,
    > Nick




  14. #14
    Nick
    Guest

    Re: average based on weekday

    WOW, three great answers with three different approachs and in such a short
    time.

    Thank you ever so much,
    Nick


    "Max" wrote:

    > Try, array-entered, i.e. press CTRL+SHIFT+ENTER:
    >
    > For weekdays:
    > =AVERAGE(IF(WEEKDAY(A1:A8,2)={1,2,3,4,5},B1:B8))
    >
    > For weekends:
    > =AVERAGE(IF(WEEKDAY(A1:A8,2)={6,7},B1:B8))
    >
    > Adapt the ranges to suit ..
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    > "Nick" <[email protected]> wrote in message
    > news:[email protected]...
    > > I'm trying to average a column of numbers based on the day of the week.
    > > Col A has the sequential days of the month, Col B has a number for each

    > day.
    > > I want to average all the numbers in Col B that are based on a weekday or
    > > weekend.
    > > --
    > > Thanks,
    > > Nick

    >
    >
    >


  15. #15
    Max
    Guest

    Re: average based on weekday

    You're welcome !
    Thanks for the feedback (from us <g>) ..
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Nick" <[email protected]> wrote in message
    news:[email protected]...
    > WOW, three great answers with three different approachs
    > and in such a short time.
    >
    > Thank you ever so much,
    > Nick




  16. #16
    Max
    Guest

    Re: average based on weekday

    "Bob Phillips" wrote
    > I like this answer best Max, but haven't we been here before
    > =AVERAGE(IF(WEEKDAY(A1:A8,2)<=5,B1:B8))
    > <EVBG>


    Yes (scratch-scratch) I vaguely recollect .. the conditional formatting
    episode ? <bg>. Heck, it's now confirmed as one of my several blind spots:
    that 1 week = 7 days only, Bob ! Cheers.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  17. #17
    Bob Phillips
    Guest

    Re: average based on weekday

    hey Max,

    Greeting from Wessex

    The best part is that you used the ,2 argument to make the list simpler, but
    stopped one step short

    =AVERAGE(IF(WEEKDAY(A1:A8,2)={1,2,3,4,5},B1:B8))

    which I think is as previous.

    Be content in that the concept was the best though <g>

    Bob

    "Max" <[email protected]> wrote in message
    news:%[email protected]...
    > "Bob Phillips" wrote
    > > I like this answer best Max, but haven't we been here before
    > > =AVERAGE(IF(WEEKDAY(A1:A8,2)<=5,B1:B8))
    > > <EVBG>

    >
    > Yes (scratch-scratch) I vaguely recollect .. the conditional formatting
    > episode ? <bg>. Heck, it's now confirmed as one of my several blind

    spots:
    > that 1 week = 7 days only, Bob ! Cheers.
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    >
    >




  18. #18
    Max
    Guest

    Re: average based on weekday

    > Be content in that the concept was the best though <g>

    Thanks for the view ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  19. #19
    Max
    Guest

    Re: average based on weekday

    "Bob Phillips" wrote
    > I like this answer best Max, but haven't we been here before
    > =AVERAGE(IF(WEEKDAY(A1:A8,2)<=5,B1:B8))
    > <EVBG>


    Yes (scratch-scratch) I vaguely recollect .. the conditional formatting
    episode ? <bg>. Heck, it's now confirmed as one of my several blind spots:
    that 1 week = 7 days only, Bob ! Cheers.
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  20. #20
    Max
    Guest

    Re: average based on weekday

    > Be content in that the concept was the best though <g>

    Thanks for the view ! <g>
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----



  21. #21
    Bob Phillips
    Guest

    Re: average based on weekday

    hey Max,

    Greeting from Wessex

    The best part is that you used the ,2 argument to make the list simpler, but
    stopped one step short

    =AVERAGE(IF(WEEKDAY(A1:A8,2)={1,2,3,4,5},B1:B8))

    which I think is as previous.

    Be content in that the concept was the best though <g>

    Bob

    "Max" <[email protected]> wrote in message
    news:%[email protected]...
    > "Bob Phillips" wrote
    > > I like this answer best Max, but haven't we been here before
    > > =AVERAGE(IF(WEEKDAY(A1:A8,2)<=5,B1:B8))
    > > <EVBG>

    >
    > Yes (scratch-scratch) I vaguely recollect .. the conditional formatting
    > episode ? <bg>. Heck, it's now confirmed as one of my several blind

    spots:
    > that 1 week = 7 days only, Bob ! Cheers.
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    >
    >




  22. #22
    Nick
    Guest

    average based on weekday

    I'm trying to average a column of numbers based on the day of the week.
    Col A has the sequential days of the month, Col B has a number for each day.
    I want to average all the numbers in Col B that are based on a weekday or
    weekend.
    --
    Thanks,
    Nick

  23. #23
    Max
    Guest

    Re: average based on weekday

    You're welcome !
    Thanks for the feedback (from us <g>) ..
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Nick" <[email protected]> wrote in message
    news:[email protected]...
    > WOW, three great answers with three different approachs
    > and in such a short time.
    >
    > Thank you ever so much,
    > Nick




  24. #24
    Bob Phillips
    Guest

    Re: average based on weekday

    I like this answer best Max, but haven't we been here before

    =AVERAGE(IF(WEEKDAY(A1:A8,2)<=5,B1:B8))

    <EVBG>

    Bob

    "Max" <[email protected]> wrote in message
    news:[email protected]...
    > Try, array-entered, i.e. press CTRL+SHIFT+ENTER:
    >
    > For weekdays:
    > =AVERAGE(IF(WEEKDAY(A1:A8,2)={1,2,3,4,5},B1:B8))
    >
    > For weekends:
    > =AVERAGE(IF(WEEKDAY(A1:A8,2)={6,7},B1:B8))
    >
    > Adapt the ranges to suit ..
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    > "Nick" <[email protected]> wrote in message
    > news:[email protected]...
    > > I'm trying to average a column of numbers based on the day of the week.
    > > Col A has the sequential days of the month, Col B has a number for each

    > day.
    > > I want to average all the numbers in Col B that are based on a weekday

    or
    > > weekend.
    > > --
    > > Thanks,
    > > Nick

    >
    >




  25. #25
    Nick
    Guest

    Re: average based on weekday

    WOW, three great answers with three different approachs and in such a short
    time.

    Thank you ever so much,
    Nick


    "Max" wrote:

    > Try, array-entered, i.e. press CTRL+SHIFT+ENTER:
    >
    > For weekdays:
    > =AVERAGE(IF(WEEKDAY(A1:A8,2)={1,2,3,4,5},B1:B8))
    >
    > For weekends:
    > =AVERAGE(IF(WEEKDAY(A1:A8,2)={6,7},B1:B8))
    >
    > Adapt the ranges to suit ..
    > --
    > Rgds
    > Max
    > xl 97
    > ---
    > GMT+8, 1° 22' N 103° 45' E
    > xdemechanik <at>yahoo<dot>com
    > ----
    > "Nick" <[email protected]> wrote in message
    > news:[email protected]...
    > > I'm trying to average a column of numbers based on the day of the week.
    > > Col A has the sequential days of the month, Col B has a number for each

    > day.
    > > I want to average all the numbers in Col B that are based on a weekday or
    > > weekend.
    > > --
    > > Thanks,
    > > Nick

    >
    >
    >


  26. #26
    Max
    Guest

    Re: average based on weekday

    Try, array-entered, i.e. press CTRL+SHIFT+ENTER:

    For weekdays:
    =AVERAGE(IF(WEEKDAY(A1:A8,2)={1,2,3,4,5},B1:B8))

    For weekends:
    =AVERAGE(IF(WEEKDAY(A1:A8,2)={6,7},B1:B8))

    Adapt the ranges to suit ..
    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    "Nick" <[email protected]> wrote in message
    news:[email protected]...
    > I'm trying to average a column of numbers based on the day of the week.
    > Col A has the sequential days of the month, Col B has a number for each

    day.
    > I want to average all the numbers in Col B that are based on a weekday or
    > weekend.
    > --
    > Thanks,
    > Nick




  27. #27
    Bob Phillips
    Guest

    Re: average based on weekday

    Weekends: =SUMPRODUCT(--(WEEKDAY(A2:A10,2)>5),B2:B10)
    Weekdays: =SUMPRODUCT(--(WEEKDAY(A2:A10,2)<=5),B2:B10)

    --
    HTH

    Bob Phillips

    "Nick" <[email protected]> wrote in message
    news:[email protected]...
    > I'm trying to average a column of numbers based on the day of the week.
    > Col A has the sequential days of the month, Col B has a number for each

    day.
    > I want to average all the numbers in Col B that are based on a weekday or
    > weekend.
    > --
    > Thanks,
    > Nick




  28. #28
    Bernie Deitrick
    Guest

    Re: average based on weekday

    Nick,

    For the weekend average,

    =SUMPRODUCT((WEEKDAY(A1:A365,2)>5)*B1:B365)/SUMPRODUCT((WEEKDAY(A1:A365,2)>5)*1)

    For the weekday average
    =SUMPRODUCT((WEEKDAY(A1:A365,2)<6)*B1:B365)/SUMPRODUCT((WEEKDAY(A1:A365,2)<6)*1)

    HTH,
    Bernie
    MS Excel MVP


    "Nick" <[email protected]> wrote in message
    news:[email protected]...
    > I'm trying to average a column of numbers based on the day of the week.
    > Col A has the sequential days of the month, Col B has a number for each day.
    > I want to average all the numbers in Col B that are based on a weekday or
    > weekend.
    > --
    > Thanks,
    > Nick




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1