+ Reply to Thread
Results 1 to 4 of 4

Help! Formula to return value if "Open" (Vlookup / Offset?)

  1. #1
    Registered User
    Join Date
    03-05-2019
    Location
    Virginia
    MS-Off Ver
    2012
    Posts
    2

    Help! Formula to return value if "Open" (Vlookup / Offset?)

    Hey there, first posting! I'm hoping someone might be able to help me out.

    excelexample.jpg

    As an example, I'd like a formula to look up each status of 43842, and if it's open, return "Open" and "1". If it's anything but "Open", it can return cancelled or open, doesn't matter.

    I used this formula initially. It works but then completely bogged down my computer (array and it's for a huge file).

    {=INDEX(Pivot!$A:$C,SMALL(IF(OFFSET(Pivot!$A:$C,0,0,ROWS(Pivot!$A:$C),1)=A6,
    ROW(OFFSET(Pivot!$A:$C,0,0,ROWS(Pivot!$A:$C),1))-ROW( OFFSET(Pivot!$A:$C,0,0,1,1) )+1,
    ROW(OFFSET(Pivot!$A:$C,ROWS(Pivot!$A:$C)-1,0,1,1))+1),COUNTIF(OFFSET(Pivot!$A:$C,0,0,ROWS(Pivot!$A:$C),1),A6)),2)}

    This formula returned the status of the last instance in the data, so worked kind of.

    Any help is appreciated!!
    Attached Images Attached Images
    Last edited by mgrunb; 03-05-2019 at 05:40 PM.

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,554

    Re: Help! Formula to return value if "Open" (Vlookup / Offset?)

    Hello mgrunb and Welcome to Excel Forum.
    It would seem that you are only a formula to return the # as you are only looking for one 'Status' (i.e. Open).
    Since you are using an Excel version newer than 2010 you could use the AGGREGATE function as in: =INDEX(C$2:C$5,AGGREGATE(15,6,(ROW(A$2:A$5)-ROW(A$1))/(A$2:A$5=E2)/(B$2:B$5=F2),1))
    If this doesn't work for your purposes please upload a sample data file, not a screenshot, with the desired results manually displayed so that we can attempt to write formulas/code to replicate them.
    To upload a sample workbook click on the GO ADVANCED button below the Quick Reply window and then scroll down to Manage Attachments to open the upload window.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    03-05-2019
    Location
    Virginia
    MS-Off Ver
    2012
    Posts
    2

    Re: Help! Formula to return value if "Open" (Vlookup / Offset?)

    Thanks JeteMc! Appreciate the reply. I haven't tried this yet since I found method. Let me know if you can shoot any holes in it...

    I took the data and made a column to the right. Anything that is Open is marked as 1, closed as 2, expired as 3, etc. In order of priority. Honestly if it's open, that's the important one. If it's closed, doesn't matter what the designation is. Then sorted small to large and then reran my Vlookup for that was the first result.

    Let me know what you think. I would attach the spreadsheet if i could but it's all company information.

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Help! Formula to return value if "Open" (Vlookup / Offset?)

    Is it are you looking for:

    F1=LOOKUP("ZZZ",$B$1:$B$10)
    G1=VLOOKUP(F1,B1:C10,2,0)

    Untitled.png
    Quang PT

+ 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] VLOOKUP to compare 2 columns and return "Yes" or "No" in 3rd column
    By rmccain in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-05-2017, 09:38 PM
  2. [SOLVED] Help with lookup formula to return "Available" or "Unavailable" based on last entry
    By AntonyCole1979 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-07-2017, 12:28 PM
  3. [SOLVED] Formula to Locate Matching Data in Worksheets and return "1" or "0" to a specified Cell
    By hammer2 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-30-2015, 04:52 AM
  4. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  5. [SOLVED] If Cell in column = "Y" then with offset (0, 1).value match to sheet range A3:A return ...
    By Spyderz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-13-2012, 02:00 PM
  6. VLookup to return "true" or "false"
    By Sph01 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-29-2011, 11:10 AM
  7. Replies: 3
    Last Post: 02-16-2011, 02:55 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