+ Reply to Thread
Results 1 to 4 of 4

Thread: Return Column Name

  1. #1
    Registered User
    Join Date
    01-06-2010
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    2

    Return Column Name

    I have a worksheet with over 200 columns and 3000 rows. It is like a ledger, where each column is a different account.

    I need a formula for each row of my worksheet, that searches every column in that specific row until it finds one that has an unspecified number in it, and returns the name of the column with the number.

    Sample:
    Category Account 1 Account 2 Account 3 Account 4
    Expense 1 Account 1 100
    Expense 2 ? 200
    Expense 3 ? 300

    So I want it to return the name of the column that has the number in it as the name of the category as shown in the example for account 1. In other words category for expense 2 should be account 2 and category for expense 3 should return a text string that says "Account 4"

    Is this possible, and can someone give me a template formula to do so, It would be greatly appreciated.

    I have attached a sample spreadsheet to make the example more understandable
    Attached Files Attached Files

  2. #2
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: Help-Return Column Name

    Try:

    =LOOKUP(9.99999999E+307,C4:L4,$C$3:$L$3)

    copied down
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Registered User
    Join Date
    01-06-2010
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Return Column Name

    it just returns the value in the first column each time, but it's a start, thanks!

  4. #4
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: Return Column Name

    See attached.
    Attached Files Attached Files
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

+ 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.2.0