+ Reply to Thread
Results 1 to 8 of 8

Lookup dates in a row

  1. #1
    Registered User
    Join Date
    10-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    20

    Lookup dates in a row

    Hi,

    I have a sheet that records products ordered and whether they arrived or not against a date.

    I'm looking for a way to do a vlookup on a value in a range and then find the first occurence of a non arrival, the last occurence, return the dates of these and then count the number of occurences of non arrivals. Return the values in cells b15, c15 and d15

    Could anyone help me how to do this please? File attached.

    Many thanks.
    Attached Files Attached Files
    Last edited by lucasreece; 03-12-2015 at 11:03 AM.

  2. #2
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Lookup dates in a row

    The last occurrence should be 16-3-15..isn't it?? and total occurrences are 10
    Try these formula
    B15=INDEX($A$1:$K$1,MIN(IF($B$3:$K$12="No",IF(ISODD(COLUMN($B$3:$K$12)),COLUMN($B$3:$K$12),""),""))-1)
    C15=INDEX($A$1:$K$1,MAX(IF($B$3:$K$12="No",IF(ISODD(COLUMN($B$3:$K$12)),COLUMN($B$3:$K$12),""),""))-1)
    These both are array formulas

    D15=COUNTIF(B3:K12,"No")
    Happy to Help

    How to upload excel workbooks at this forum - http://www.excelforum.com/the-water-...his-forum.html

    "I don't get things easily, so please be precise and elaborate"

    If someone's post has helped you, thank by clicking on "Add Reputation" below the post.
    If your query is resolved please mark the thread as "Solved" from the "Thread Tools" above.

    Sourabh

  3. #3
    Registered User
    Join Date
    10-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Lookup dates in a row

    No I need to vlookup product name (a15) in range a3:k12 and return the dates for the first and last occurences for each product name and the count of each product name for non arrivals.

    Hope that makes sense.

    Thanks.

  4. #4
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Lookup dates in a row

    Ok try this
    B15=IFERROR(INDEX($A$1:$K$1,MIN(IF($B4:$K4="No",IF(ISODD(COLUMN($B4:$K4)),COLUMN($B4:$K4),""),""))-1),"")
    C15=IFERROR(INDEX($A$1:$K$1,MAX(IF($B3:$K3="No",IF(ISODD(COLUMN($B3:$K3)),COLUMN($B3:$K3),""),""))-1),"")
    D15==COUNTIF(B3:K3,"No")
    All the three formulas copied down...and first two are array formulas...
    Check attached!!
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Lookup dates in a row

    Excellent, thankyou for your help.

  6. #6
    Registered User
    Join Date
    10-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Lookup dates in a row

    Sorry can anyone help with this further please.

    I have more than 2 columns per date header now but sourabhg98 solution works on odd columns in the specified range(?) and therefore doesn't work after adding in extra columns now.

    Also, can a vlookup be used to lookup the product rather than referring to line number? See latest file attached.

    Hope that makes sense.

    Many thanks.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-12-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Lookup dates in a row

    Can anyone help with this please?

    Many thanks.

  8. #8
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Lookup dates in a row

    So you want to lookup 4th header??
    No problems
    Check attached
    Attached Files Attached Files

+ 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] V-Lookup Dates
    By GoGoeGo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-17-2014, 11:37 PM
  2. Replies: 2
    Last Post: 10-21-2013, 07:55 PM
  3. Replies: 1
    Last Post: 06-25-2012, 12:45 AM
  4. lookup dates
    By PhilH1982 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-05-2007, 11:13 AM
  5. Lookup ID and between dates?
    By tinkerbelle in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-13-2007, 04:29 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