+ Reply to Thread
Results 1 to 3 of 3

Search row and return column header

  1. #1
    Registered User
    Join Date
    10-01-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    2

    Search row and return column header

    Hey,

    I am trying generate a formula to search a row and when a figure is found, return the column header relating to that row. There should only be one entry per row which I've tried to illustrate below: (Note the total column is being analysed out like a cashbook idea so might allow a match formula?)

    A B C D E
    1 Total Header 1 Header 2 Header 3
    2 **Need Formula to Return "Header 1" ** £15 £15 0 0
    3 **Need Formula to Return "Header 2" ** £20 0 £20 0
    4 **Need Formula to Return "Header 3" ** £30 0 0 £30



    I dont really know where to start with the formula, so any tips are welcome!!!

    Thanks!
    Last edited by j_alexander; 10-01-2012 at 04:55 PM.

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

    Re: Search row and return column header

    If your data is numbers

    =LOOKUP(9E300,C3:E3,$C$2:$E$2)
    if text
    =LOOKUP("zzzz",C3:E3,$C$2:$E$2)
    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
    Registered User
    Join Date
    10-01-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Search row and return column header

    Yeh that works a treat - thanks!!

+ 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