+ Reply to Thread
Results 1 to 4 of 4

Puzzling Formula With Several Variables

Hybrid View

  1. #1
    Registered User
    Join Date
    01-16-2014
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    30

    Puzzling Formula With Several Variables

    I'm trying to put together a bit of a report, and I'm finding it somewhat of a puzzle that I can't quite solve. There seems to be too many variables for me to wrap my brain around! I'm sure that what I am trying to achieve is possible, but I just can't put together the puzzle.

    I'm trying to work out an average target number of hours per day for a number of individuals over a given date range. Previously this was easy, as the target remained the same, and therefore the daily average was always the same number also.

    Now however, I need to add functionality that allows for promotions and therefore a different target for a particular individual from a particular date. As such, the average target hours per day would need to capture this. And then to further confuse matters, occasionally the target hours for each position will change from a particular date. And so again, this will need to be captured within the average target hours per day.

    I've put together some dummy data. There's a fair bit more to the actual report, but if it I can just get my head around a workable solution for this, I should be able to incorporate this. Does anyone have any bright ideas?

    Thanks in advance to any brainboxes out there!

    Skins
    Attached Files Attached Files
    Last edited by Skins11; 05-03-2023 at 05:28 PM.

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: Puzzling Formula With Several Variables

    Maybe like this, do not make the table sideways but down on sheet "Targets"

    then put this formula on B6 on report table

    =AVERAGEIFS(Targets!$C$2:$C$21,Targets!$A$2:$A$21,LOOKUP(2,1/(Promotions!B2:F2<>""),Promotions!B2:F2),Targets!$B$2:$B$21,">="&$B$1,Targets!$B$2:$B$21,"<="&$B$2)
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    01-16-2014
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    30

    Re: Puzzling Formula With Several Variables

    Thanks Azumi,

    I've tried calculating manually what the averages should be, and for some reason it's giving different outputs (as per the below).

    Attachment 828129

    I can see that the formula takes into consideration the date range to search in, the promotions and the varying targets. I'm not entirely sure therefore why it's giving the answers that it is.

    I'll try and rack my brains some more and see if I can figure this out.

    Really appreciate you looking at this all the same.

    Skins

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,302

    Re: Puzzling Formula With Several Variables

    Selecting attachment 828129 results in the following: "Invalid Attachment specified. If you followed a valid link, please notify the administrator".
    It may be more helpful to upload an .xlsx file.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Puzzling Indentation
    By raywood1 in forum Excel General
    Replies: 2
    Last Post: 11-29-2022, 12:36 PM
  2. Puzzling autoclose msgbox macro behaviour
    By jmac1947 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-01-2014, 08:14 AM
  3. Puzzling grey rectangle
    By norgro in forum Excel General
    Replies: 10
    Last Post: 12-22-2012, 02:51 AM
  4. Simple Operation Turned Puzzling
    By cheiss8078 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-05-2007, 02:19 PM
  5. Sum help this is puzzling???????????
    By scott in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-01-2006, 02:55 PM
  6. Puzzling Format Questions
    By Kevin H. Stecyk in forum Excel General
    Replies: 3
    Last Post: 05-17-2005, 07:06 AM
  7. [SOLVED] Puzzling Memory Error !
    By Donna in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-05-2005, 11:06 PM

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