+ Reply to Thread
Results 1 to 6 of 6

Small Function To Return Date Range

  1. #1
    Registered User
    Join Date
    06-01-2014
    Posts
    79

    Small Function To Return Date Range

    Hi Experts,

    I have been stumped for a while on how to get my formula to show the specified rows where the condition is a range

    I work for a trucking company where each load (from destination to origin) is recorded on a master sheet. Using the information from the master sheet I am trying to create a section that summarizes each drivers productivity for the current pay period.

    the drivers get payed every 14 days.

    I have a formula that the user enters a [Driver Name], and a [Date].

    The formula then return the rows that match those two criteria.


    I would like to have a user just select the Driver and Date and it will also return the previous 14 days

    Here's my working formula for just 1 day

    Please Login or Register  to view this content.
    The code in blue shows what I need to modify to show the Date Range ($E$3-14 to $E$3)

    I have tried to use an AND to add conditions to the IF statement....


    Please Login or Register  to view this content.
    But I haven't had any luck. This could be something simple that I'm just missing.

    Here's the worksheet. The sheet with the formula is "Driver Hours"
    December Template Test 12-17.xlsx

    Any help is greatly appreciated.

    Thank you!

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Small Function To Return Date Range

    Hint...

    A light yellow font on a white background is impossible to see (at least for me).
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    06-01-2014
    Posts
    79

    Re: Small Function To Return Date Range

    my mistake. I just changed it to blue if that makes it more visible

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Small Function To Return Date Range

    This seems to work:

    =IFERROR(SMALL(IF((Table18[Delivery Driver]=$B$3)*(Table18[Delivery Date]>=($E$3-13))*(Table18[Delivery Date]<=$E$3), ROW(Table18[Delivery Driver])), ROWS(G$6:G6)),"-")
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    06-01-2014
    Posts
    79

    Re: Small Function To Return Date Range

    awesome! thank you very much.

    Just to pick your brain for a second, is the IF statement multiplying those three results together then seeing if they equal (1) for the conditional?

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Small Function To Return Date Range

    Yes, that's what is happening.

    TRUE*TRUE*TRUE = 1

    Any other combination = 0

+ 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. Check a date range and return value based on the date range
    By KeithCar in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-13-2015, 12:55 PM
  2. How Small Function works when small(array,1),small(array,2) are same ?
    By bkvenkat in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-02-2015, 02:00 AM
  3. IF SMALL function to ignore a date within a rage of other numbers
    By jamiegfinch in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-18-2014, 05:37 PM
  4. [SOLVED] LOOKUP TODAY function within a date range to return a value
    By Mike Brewer in forum Excel General
    Replies: 9
    Last Post: 12-04-2013, 12:09 PM
  5. [SOLVED] reference date time range, return the value into all cell that match datetime range
    By Jarvco13 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-22-2013, 10:39 PM
  6. Search date range +/- 7 days and return date that falls within range
    By tlafferty in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-13-2013, 03:26 PM
  7. Use criteria for values in range for small function
    By like2hike in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-21-2006, 12:15 PM

Tags for this Thread

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