+ Reply to Thread
Results 1 to 4 of 4

Checking cells for a certain value, then returning the name of the column when it is found

  1. #1
    Registered User
    Join Date
    08-02-2013
    Location
    Sacramento, CA
    MS-Off Ver
    Excel 2010
    Posts
    25

    Checking cells for a certain value, then returning the name of the column when it is found

    Alright,

    Let me see if I can articulate what I am trying to do. I have attached an excel file that shows what I am trying to accomplish. Basically, I would like to identify the columns that have a certain value (ie, greater than 15). If the value of the cell in column A on row 2 is greater than 15, then provide the name of the column in a cell that summaries all the columns that have a value greater than 15.

    Good lord, I hope that made sense.

    Please see the excel file example.

    Thanks for any help!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Checking cells for a certain value, then returning the name of the column when it is f

    Put this code in a standard module (not the sheet-level module):

    Please Login or Register  to view this content.
    Then put this formula in K2 and drag down:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by abousetta; 09-08-2014 at 08:51 PM.
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    08-02-2013
    Location
    Sacramento, CA
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Checking cells for a certain value, then returning the name of the column when it is f

    That actually worked really well, the only thing is that the first it leads with Accounts each time.

    Example:
    ACCOUNTS, RED, ORANGE, GREY
    ACCOUNTS, GREY
    ACCOUNTS, PURPLE, GREY
    ACCOUNTS, PURPLE, GREY
    ACCOUNTS, PURPLE
    ACCOUNTS, RED, PURPLE, ORANGE, GREY
    ACCOUNTS, RED, ORANGE
    ACCOUNTS, PURPLE, GREY
    ACCOUNTS, PURPLE, ORANGE, PINK, GREY
    ACCOUNTS, BLUE, PURPLE, PINK
    ACCOUNTS, GREY
    ACCOUNTS, ORANGE, PINK, BLACK
    ACCOUNTS

  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Checking cells for a certain value, then returning the name of the column when it is f

    So I'm guessing that your first column has a header of "Accounts" and below it the account name. This is slightly different from the example. In that case, just change the range you are using to begin with Column B instead of Column A so that the first formula is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    abousetta

+ 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] Checking if a value can be found in a colum and then return a value in another column
    By NowelChits in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-06-2013, 12:02 PM
  2. [SOLVED] Using Find and Returning the Column Number of the Found Cell
    By Steve0492 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-31-2012, 03:49 PM
  3. checking a cell range and returning the column number
    By jeskit in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-03-2011, 08:07 AM
  4. Replies: 3
    Last Post: 08-11-2010, 11:42 AM
  5. Checking two cells for text, returning one value
    By sdaddy in forum Excel General
    Replies: 4
    Last Post: 06-09-2009, 02:49 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