+ Reply to Thread
Results 1 to 3 of 3

Max Date using recursive function

Hybrid View

  1. #1
    Registered User
    Join Date
    09-29-2016
    Location
    London
    MS-Off Ver
    2007
    Posts
    1

    Max Date using recursive function

    Hi All,

    Can someone help me with the formula for below logic please:

    Description: Have multiple rows with the same desk name but different dates. I would like to have a formula which returns the max date with in the given date range.

    I tried using the below formula and everything is returning no. Can someone assist me to fix it pls?

    =if(deskname=deskname,if(and(date>=25-Apr-2016, date <=01-May-2016)),max(date),"no"). I tried using it as array as well but no luck.

    example below:

    Desk 1 01-May-2016

    Desk 2 29-Apr-2016

    Desk 1 28-Apr-2016

    Thanks in Advance.



    Karthick

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Max Date using recursive function

    Try this, with start date in G1 and end date in G2. An array entered formula:

    =MAX(IF($A$1:$A$3="desk 1",IF($B$1:$B$3>=$G$1,IF($B$1:$B$3<=$G$2,$B$1:$B$3))))

    Array Formulae are a little different from ordinary formulas in that they MUST be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.

    You will know the array is active when you see curly braces { } appear around the outside of your formula. If you do not CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly braces yourself - it won't work...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,694

    Re: Max Date using recursive function

    Try

    =MAX(($B$1:$B$6)*($A$1:$A$6="Desk 1"))

    Enter with Ctrl+Shift+Enter#

    dates in column B

    If not testing for Start/end dates!

+ 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. [SOLVED] Recursive factorial function
    By amphinomos in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-09-2015, 06:24 AM
  2. [SOLVED] Excel Recursive function or not..! Pl help
    By xsmash in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 09-13-2013, 09:17 PM
  3. Some One Help me write Recursive function on my Code
    By jatin89 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-25-2013, 07:40 PM
  4. Recursive function that updates columns
    By lundy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-06-2012, 04:25 PM
  5. writing a recursive function
    By rmoney in forum Excel General
    Replies: 6
    Last Post: 07-19-2010, 02:59 PM
  6. Recursive/Running Function
    By goldm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-07-2009, 08:34 AM
  7. [SOLVED] Why doesn't this recursive function return the right value?
    By RB Smissaert in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-02-2005, 09:05 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