+ Reply to Thread
Results 1 to 7 of 7

If MIN OFFSET

  1. #1
    Registered User
    Join Date
    12-22-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    12

    If MIN OFFSET

    Hi All,

    I am trying to return a comment based on the oldest date;

    Example attached;
    I would want to find the oldest date that is "B" in column B and has no date in column D. I then want to pull across the comment that is in Column C.

    I have tried using an offset If min formula without any luck, can anyone assist?

    Thanks,
    Attached Files Attached Files

  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: If MIN OFFSET

    Try this array formula**:

    =INDEX(C2:C11,MATCH(MAX(IF((B2:B11="B")*(D2:D11=""),A2:A11)),IF((B2:B11="B")*(D2:D11=""),A2:A11),0))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,933

    Re: If MIN OFFSET

    @Biff
    I think that the Max should be a Min. OP is looking for Oldest date. Nice formula in spite of this.

    Alan
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

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

    Re: If MIN OFFSET

    Ok, so try one or the other...

    The MAX version in post #2 for the most recent date or this MIN version for the earliest date.

    Try this array formula**:

    =INDEX(C2:C11,MATCH(MIN(IF((B2:B11="B")*(D2:D11=""),A2:A11)),IF((B2:B11="B")*(D2:D11=""),A2:A11),0))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

  5. #5
    Registered User
    Join Date
    12-22-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    12
    Changed the max to min and worked perfectly thanks.

    Makes sense now I've seen the formula

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

    Re: If MIN OFFSET

    You're welcome. Thanks for the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

  7. #7
    Registered User
    Join Date
    01-09-2020
    Location
    Istanbul
    MS-Off Ver
    Office365
    Posts
    1

    Re: If MIN OFFSET

    Mr. Valko,
    You are really excel magician.
    This is one of the craziest formula I have ever seen
    Thank you very much !

    All The Best Mr. Valko

+ 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. How to offset previously offset-ed cell ?
    By freshe in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-07-2015, 09:34 AM
  2. Select offset variable offset cells
    By papasmurfuo9 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-02-2014, 06:12 AM
  3. Replies: 3
    Last Post: 06-01-2014, 10:26 AM
  4. [SOLVED] SpeedUp/Alternative to Offset.Value = Offset.Value
    By Jovica in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-13-2013, 01:43 AM
  5. function similar to offset to offset the offset
    By Jerseynjphillypa in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-03-2012, 03:07 PM
  6. Reformatting - insert formula with offset, then offset to next cell
    By Armitage2k in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-06-2011, 05:41 AM
  7. Replies: 7
    Last Post: 11-04-2008, 06:41 AM

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