Consulting

Results 1 to 3 of 3

Thread: Solved: Averaging figures logged in the AM vs PM hours

  1. #1
    VBAX Expert
    Joined
    Feb 2010
    Posts
    696
    Location

    Solved: Averaging figures logged in the AM vs PM hours

    I have a simple AVERAGE formula which averages all data in Column C. Each row of data includes both the date (Column A) and time (Column B) for that particular entry. What I am wanting to do is to be able to include several averages, i.e., the average of the data for the AM hours, the average for the PM hours and an overall average.

    The Time range is $B$4:$B$100 and is formatted as 8:30 AM, 9:40 PM, etc. The data range to which the various averages will be applied is in $C$4:$C$100.

    I've experimented with SUMPRODUCT and AVERAGEIF; however, I can't seem to the formula to apply a criteria such that it tests for the HOUR being <12 vs >=12. Any help will be greatly appreciated.

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,875
    use criteria as follows:
    ">=.5"
    "<.5"
    including the quote marks in your AverageIf formulae. Times are held as fractions of a day, so .5 is noon, 0.25 is 6am etc.
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #3
    VBAX Expert
    Joined
    Feb 2010
    Posts
    696
    Location
    Quote Originally Posted by p45cal
    use criteria as follows:
    ">=.5"
    "<.5"
    including the quote marks in your AverageIf formulae. Times are held as fractions of a day, so .5 is noon, 0.25 is 6am etc.
    That did the trick. Thanks for the tip.

Posting Permissions

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