+ Reply to Thread
Results 1 to 6 of 6

Vlookup formla to return a header help please

  1. #1
    Registered User
    Join Date
    11-12-2015
    Location
    london
    MS-Off Ver
    2005
    Posts
    37

    Vlookup formla to return a header help please

    Hello

    Im after some help please. Ive attached a spreadsheet and what I would like is in cell A2 to look along E2 to K2 and return the first cell which contains a number but instead od showing the number return the date from range E1 to K1 and then the second date in B2 and the third in C2. So the results would be 07/07/2016 for cell A2, 23/10/2016 for cell B2 and finally 28/04/2017 for cell C2.

    Thanks for any help.
    Attached Files Attached Files

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Vlookup formla to return a header help please

    Try

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


    ...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.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

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

    Re: Vlookup formla to return a header help please

    You can use this array* formula in A2:

    =SMALL(IF($E2:$K2>0,$E$1:$K$1),COLUMNS($A:A))

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

    Format the cell as a date, then copy across and down as required.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    11-12-2015
    Location
    london
    MS-Off Ver
    2005
    Posts
    37

    Re: Vlookup formla to return a header help please

    Hello

    Both them formulas work great but if there isnt a number its returning #NUM! is there a way for it to return a blank cell if the the number is 0?

    Thanks

  5. #5
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Vlookup formla to return a header help please

    Try

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

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

    Re: Vlookup formla to return a header help please

    You can change my formula in A2 to this:

    =IFERROR(SMALL(IF($E2:$K2>0,$E$1:$K$1),COLUMNS($A:A)),"")

    use CSE to commit the formula, then copy across and down.

    Hope this helps.

    Pete

+ 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] Find specific value in table and return header row and header column value
    By nelwan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-30-2013, 01:35 AM
  2. Replies: 4
    Last Post: 03-13-2013, 12:38 PM
  3. Vlookup return the header name of table (Table of 4 column x 55 rows)
    By sanpat in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-09-2013, 11:23 PM
  4. [SOLVED] Need a formla for if 0.00 return a blank or sum a range
    By SueMac in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-20-2012, 02:31 PM
  5. VLOOKUP? If cell has a "1", then return column header
    By mattbr80 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-31-2012, 12:46 AM
  6. [SOLVED] Vlookup to return column header name
    By rodge in forum Excel General
    Replies: 15
    Last Post: 04-09-2012, 07:29 PM
  7. [SOLVED] Vlookup to return column header name
    By pierrolefou in forum Excel General
    Replies: 1
    Last Post: 04-04-2012, 07:23 PM
  8. Use vlookup to return column header?
    By winspiff in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-06-2008, 09:33 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