+ Reply to Thread
Results 1 to 4 of 4

Return column headers for all true values in Google Sheets

  1. #1
    Registered User
    Join Date
    03-29-2021
    Location
    London, England
    MS-Off Ver
    Google Sheets
    Posts
    7

    Return column headers for all true values in Google Sheets

    Hi everyone,

    I have a large data sheet with a list of suppliers and one column for each supplier with a TRUE or FALSE value (this is a text field).
    I'd like to consolidate all true suppliers in one cell.

    In the image below I'd like column G to summarise all suppliers with the value TRUE (i.e. "Supplier 2, Supplier 3" for row 3.

    Screenshot 2021-03-29 at 13.29.25.png
    Can anyone help me with the right formula?

    Many thanks

    Tim

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,945

    Re: Return column headers for all true values in Google Sheets

    If you can live without the commas:

    =trim(ARRAYFORMULA(join(" ",if(B2:F2,$B$1:$F$1,""))))

    or, if your Supplier names don't have any spaces:

    =substitute(trim(ARRAYFORMULA(join(" ",if(B2:F2,$B$1:$F$1,""))))," ",", ")
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,911

    Re: Return column headers for all true values in Google Sheets

    You could use:

    =join(",",filter($B$1:$F$1,B2:F2=TRUE))
    Rory

  4. #4
    Registered User
    Join Date
    03-29-2021
    Location
    London, England
    MS-Off Ver
    Google Sheets
    Posts
    7

    Re: Return column headers for all true values in Google Sheets

    Thank you both! I really appreciate your help. They both worked well - Rorya’s just that bit better as I could have commas.

+ 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] Google Sheets: Add filter symbol to column headers
    By mikeey89 in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 1
    Last Post: 01-12-2021, 03:12 PM
  2. Replies: 2
    Last Post: 12-03-2014, 11:44 AM
  3. How to return column headers for where certain values appear in each row
    By gc-spurs in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 03-16-2014, 07:05 PM
  4. [SOLVED] Return Column Headers based on row rank with duplicate values in row
    By carlwin in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-31-2013, 12:24 AM
  5. Replies: 2
    Last Post: 05-09-2012, 01:30 PM

Tags for this Thread

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