+ Reply to Thread
Results 1 to 6 of 6

IF,AND, function displaying last date

  1. #1
    Registered User
    Join Date
    01-23-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    52

    IF,AND, function displaying last date

    Hello,

    I have been trying to get this formula to work, and it appears it only works when it wants to and I cannot figure out why. Can anyone assist? Perhaps a whole new formula suggestion?

    What I'm trying to do: I have a spreadsheet with several columns of data, but I want the formula to read only two entire columns for a specific criteria for each column, then display the most recent date based off the criteria. I do not need to total up the criteria, just display the last date.

    This is what I have so far:
    =IF((AND(Sheet2!A:A=B2,Sheet2!B:B="Game: Counter Strike - Source")),MAX(Sheet2!C:C))

    I have this in a table, header as "last date" which is (C2), the B2 in my table would be where criteria would be typed in.

    So basically, my table should pull the last date from based off the criteria from raw data in sheet2, that is entered in to B2 on sheet1 and is "Game: Counter Strike - Source".

    Thanks for the help in advance.
    Last edited by Mothman; 01-24-2010 at 01:53 PM.

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: IF,AND, function displaying last date

    In order to get a precise answer more quickly, upload a sample workbook that . . .

    1. Exactly duplicates the structure of your real workbook, and
    2. Contains representative, but non-sensitive dummy data, and
    3. Manually illustrates your desired outcome
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: IF,AND, function displaying last date

    If your dates in Column C are sorted such that the last date for any given combination is always the last record you can use a LOOKUP approach, eg:

    Please Login or Register  to view this content.
    If not sorted in this manner you could use a MAX based Array but given you're using XL2003 you can not use entire column references, so - using same ranges as above

    Please Login or Register  to view this content.
    that highlighted in red is imperative...

  4. #4
    Registered User
    Join Date
    01-23-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: IF,AND, function displaying last date

    Awesome, I will give this a try. I am using Excel 2007, I thought I had changed that in my profile... It's updated now. :D

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: IF,AND, function displaying last date

    XL2007 and beyond you can use entire column references in Array formulae etc but you shouldn't... performance impact is noticeable
    (1m+ rows to process per column referenced...)

  6. #6
    Registered User
    Join Date
    01-23-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: IF,AND, function displaying last date

    This works, I changed the criteria to reference the tables that I have setup, that way if I add more data, it will automatically update the date if new data is dumped in.

    This what I did:

    =MAX(IF((Table1[Header1]=Table5[[#This Row],[Criteria Header]])*(Table1[Header2]="Criteria2"),Table1[Date]))

    then use Ctrl+Shft+Entr

    Thanks for the help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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