+ Reply to Thread
Results 1 to 3 of 3

Dynamic range lookup inside of an If statement

  1. #1
    Registered User
    Join Date
    04-13-2013
    Location
    United States
    MS-Off Ver
    Microsoft Office Mac 2011
    Posts
    10

    Exclamation Dynamic range lookup inside of an If statement

    So I'm trying to return a value from a range that is created from specific conditions:

    Client Name 1, Place for forumla , Date 1
    Client Name 1, Place for forumla , Date 2
    Client Name 1, Place for forumla , Date 3
    Client Name 2, Place for forumla , Date 1
    Client Name 2, Place for forumla , Date 2
    Client Name 3, Place for forumla , Date 1
    Client Name 3, Place for forumla , Date 2
    Client Name 3, Place for forumla , Date 3

    I want the function to select the most recent date for a range based on the client. I have written the following function: =if(G5=G4,"",MAX(Range formula Right Here). The fist if is simply saying if the previous cell matches, don't do the formula, then the second selects the most recent date from among the range, but I'm stuck on how to tell it to select a range. I only want it to select from the dates on the same row as the client.

    Possible? I'd prefer an if statement instead of a VBA code.

    Thanks!

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Dynamic range lookup inside of an If statement

    try this array formula

    =MAX(IF(A1:a100=a1,c1:c100))

    ...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 your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    04-13-2013
    Location
    United States
    MS-Off Ver
    Microsoft Office Mac 2011
    Posts
    10

    Re: Dynamic range lookup inside of an If statement

    I got the curly braces but I still get a #VALUE!.

    Edit: Didn't notice the = sign before, let me give it another go.

    Second edit: THANK YOU!!!

    Third edit: Spoke to soon...

    Fourth edit: Again, now it works (forgot the shift enter part)
    Last edited by mattdaviddesign; 07-16-2013 at 04:58 PM.

+ 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] If statement with Dynamic Range
    By dluhut in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-22-2013, 04:35 PM
  2. Dynamic range inside array formula with use of match
    By konradz in forum Excel General
    Replies: 2
    Last Post: 06-23-2012, 10:54 AM
  3. Lookup Against Dynamic Range Using VBA
    By dgo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-01-2009, 08:44 AM
  4. Dynamic Named Range inside a Data Validation list ?
    By Richard in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-11-2006, 10:00 AM
  5. Lookup with dynamic range
    By Ola Sigurdh in forum Excel General
    Replies: 4
    Last Post: 08-08-2005, 11:05 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