+ Reply to Thread
Results 1 to 8 of 8

If column has certain text, then return 1 or 0

  1. #1
    Forum Contributor
    Join Date
    11-27-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2013 & 2016
    Posts
    409

    If column has certain text, then return 1 or 0

    Hello,

    I want to look at a column, in this case column A and look for certain text like "Driver", "Operator", "Technician" and then if present return in column B, 1 if present or 0 if not present.
    Please look at the attachment of the spreadsheet for what I am wanting.

    Thanks for any assistance offered.
    Thanks
    Attached Files Attached Files
    ==========
    Bigroo1958
    Austin, Texas
    ==========

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: If column has certain text, then return 1 or 0

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

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: If column has certain text, then return 1 or 0

    One way:

    =IF(ISERROR(LOOKUP(99999,SEARCH($E$2:$E$4,A2),$E$2:$E$4)),0,1)
    Attached Files Attached Files
    Last edited by AliGW; 06-18-2023 at 11:20 AM. Reason: Workbook added.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: If column has certain text, then return 1 or 0

    B2=SUMPRODUCT(COUNTIF($A2,"*"&$D$2:$D$4&"*"))

    Copy down

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: If column has certain text, then return 1 or 0

    @Caracalla

    $E$2:$E$4

  6. #6
    Forum Contributor
    Join Date
    11-27-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2013 & 2016
    Posts
    409

    Re: If column has certain text, then return 1 or 0

    Thank you all for your quick replies, they all did the job, I decided to go with AliGW solution as I could add more jobs to the picklist.
    Thank you all again!!

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: If column has certain text, then return 1 or 0

    Glad to help & thanks for the feedback.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: If column has certain text, then return 1 or 0

    Glad to have helped.

    If you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

+ 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] Given If any words in column A match any string of text in column B, return column B
    By dbmoney123 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-02-2022, 10:55 AM
  2. [SOLVED] Search a column for parts of text and return another part of text within the same cell
    By ClaudiaRovastino in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2021, 01:06 PM
  3. [SOLVED] Return text if text found in column or sum column if just numerical values
    By LORPete in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-04-2021, 10:37 AM
  4. [SOLVED] Return text if text found in column or sum column if just numerical values
    By LORPete in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-16-2021, 05:03 AM
  5. Replies: 16
    Last Post: 05-30-2020, 12:27 PM
  6. [SOLVED] 2 cell text lookup in text string to return data from separate column
    By Zivhodiva in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-08-2019, 03:03 PM
  7. Replies: 1
    Last Post: 09-01-2011, 12:05 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