+ Reply to Thread
Results 1 to 4 of 4

Returns the header label if the condition is met

  1. #1
    Registered User
    Join Date
    04-09-2009
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2010
    Posts
    25

    Returns the header label if the condition is met

    I am trying to use vlookup, but can't find the exact combinations of functions to perform the task.

    I have tables of buyers with puchases per month as column. Now I would like to have a formula that will return the last purchase date. (the values are the header label) - see attached file

    Please advise. Thank you.
    Attached Files Attached Files
    Last edited by lemuel; 03-12-2013 at 01:42 PM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Returns the header label if the condition is met

    In B2 copied down

    =LOOKUP(2, 1/($C2:$Z2>0),$C$1:$Z$1)

    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,427

    Re: Returns the header label if the condition is met

    You can use this array* formula in B2:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and then copy down.

    *NOTE: an array formula needs to be committed using the key combination of Ctrl-Shift-Enter (CSE), rather than the usual <Enter>

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    04-09-2009
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Returns the header label if the condition is met

    thanks ChemistB- thats work.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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