+ Reply to Thread
Results 1 to 4 of 4

Find True in one of 3 columns and return column label

  1. #1
    Registered User
    Join Date
    09-07-2011
    Location
    Brighton, England
    MS-Off Ver
    Excel 2007
    Posts
    23

    Find True in one of 3 columns and return column label

    I am exporting data from a database. There are 3 columns which contain True or False depending on a database tag. The columns are labeled High, Medium and Low.

    the following works well but only finds data in 1 column:

    =IF(ISERROR(SEARCH("True",AO2)),"","High")
    =IF(ISERROR(SEARCH("True",AP2)),"","Medium")
    =IF(ISERROR(SEARCH("True",AQ2)),"","Low")

    I know I can do this for each column as above and merge the results but it would be great to do this in one statement if possible.

    I hope someone can help.

    Thanks

    Simon

  2. #2
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Find True in one of 3 columns and return column label

    try this..

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


    or you can use Index for the return part as
    Index($AO$1:$AQ$1,MATCH(TRUE,AO$2:AQ$2,0))

    please let us know.. if more that one TRUE available for each set ..
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  3. #3
    Registered User
    Join Date
    09-07-2011
    Location
    Brighton, England
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Find True in one of 3 columns and return column label

    Thanks, that's great. I had to change True to "True" as my data is text

  4. #4
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Find True in one of 3 columns and return column label

    Hi Simon..

    Thanks for feedback & rep..

    as per your last comment.. post is solved.. Please update the Title accordingly..

    To mark your thread solved do the following:
    New Method
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

+ 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 one value in multiple columns and return value from a set column
    By Grimace in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-29-2012, 01:39 AM
  2. Replies: 2
    Last Post: 02-20-2012, 11:42 PM
  3. Replies: 2
    Last Post: 12-31-2011, 06:41 AM
  4. VBA Find. return True/ False
    By WAW in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-03-2010, 06:52 AM
  5. Find unique number in columns and return column title
    By mkvassh in forum Excel General
    Replies: 3
    Last Post: 10-21-2010, 10:29 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