+ Reply to Thread
Results 1 to 9 of 9

How to remove Brackets and everything inside brackets if cell meets criteria

  1. #1
    Registered User
    Join Date
    06-13-2022
    Location
    United States
    MS-Off Ver
    2016
    Posts
    36

    How to remove Brackets and everything inside brackets if cell meets criteria

    I have cell A and cell B
    in Cell A I have string of text example: "Men's T-shirt (Small Black)"
    Cell B says "Yes"

    I want formula to do: if Cell B says YES, in cell A remove brackets and everything inside brackets leaving only rest of the text, how can I do this.
    Thank you so much!

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,617

    Re: How to remove Brackets and everything inside brackets if cell meets criteria

    I suspect that your data is more complicated than your sample. Post a file...
    You would have to put the results in a third column or use a macro since a cell can have either data or formulas not both.
    c1:
    Please Login or Register  to view this content.
    Last edited by protonLeah; 02-02-2023 at 12:15 AM.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    06-13-2022
    Location
    United States
    MS-Off Ver
    2016
    Posts
    36

    Re: How to remove Brackets and everything inside brackets if cell meets criteria

    Thanks for your reply. Cell A looks like this:
    =E7 & " ("&T7 &" " & V7 & ")"
    I want to delete this part & " ("&T7 &" " & V7 & ")" if cell B says YES, so basically (Small Black) will be removed.
    formula should leave only =E7

    something like IF B1 is YES, Cell A equals E7 otherwise, leave as is.
    Last edited by paata01; 02-02-2023 at 10:36 AM.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,099

    Re: How to remove Brackets and everything inside brackets if cell meets criteria

    as requested... pleas epost a sample excel file. see yellow banner (top) for guidelines.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  5. #5
    Registered User
    Join Date
    06-13-2022
    Location
    United States
    MS-Off Ver
    2016
    Posts
    36

    Re: How to remove Brackets and everything inside brackets if cell meets criteria

    Please check attachment. So what I am trying to do is, if column E has YES, column A to show only =B2 otherwise leave as is
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,240

    Re: How to remove Brackets and everything inside brackets if cell meets criteria

    You cannot change A without using VBA

    in separate cell e,g C1:

    =IF(B1="YES",TRIM(LEFT(A1,FIND("(",A1)-1)),A1)
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  7. #7
    Registered User
    Join Date
    06-13-2022
    Location
    United States
    MS-Off Ver
    2016
    Posts
    36

    Re: How to remove Brackets and everything inside brackets if cell meets criteria

    hm, I think it should be possible as all values are linked to other cells, something like if YES =B2, otherwise =B2 & " ("&C2 &" " & D2 & ")"

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,240

    Re: How to remove Brackets and everything inside brackets if cell meets criteria

    try

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

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,486

    Re: How to remove Brackets and everything inside brackets if cell meets criteria

    Maybe
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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. Formula to remove Brackets and Text in brackets
    By jshaw82 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 06-27-2022, 09:41 AM
  2. Insert cell value inside brackets in formula.
    By zr3cool in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-10-2017, 12:11 PM
  3. Summing brackets, when you have multiple brackets per cell
    By tmiller1002 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-26-2017, 11:22 AM
  4. [SOLVED] Automating Brackets, and Sum above Brackets in Excel Chart
    By cartica in forum Excel Charting & Pivots
    Replies: 10
    Last Post: 07-24-2014, 11:33 AM
  5. Replies: 5
    Last Post: 04-19-2012, 09:02 AM
  6. Remove brackets and data inside via macros example given
    By Hyflex in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-22-2011, 01:53 PM
  7. Find value inside the brackets
    By roger81 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-15-2009, 02:29 AM

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