+ Reply to Thread
Results 1 to 10 of 10

Conditional Formatting based on partial/specific text to highlight entire row

  1. #1
    Registered User
    Join Date
    12-05-2012
    Location
    Dallas
    MS-Off Ver
    Excel 2007
    Posts
    2

    Conditional Formatting based on partial/specific text to highlight entire row

    I am fairly certain I'm going to be told this is very simple - but after a couple of hours of trying various formulas, looking online, not so easy for me. Simply want to take a spreadsheet with data - and highlight using conditional formatting - the entire row IF one cell has specific text. It's not as simple as "equals" - because the value might be for example...."mortgage" and then it might be "MORT" and then it might also be "Dallas Mortgage Inc" or "Dallasmortgage" - etc.... - all of which I want to highlight the entire row if any of those appear as true.

    If I use "format only cells that contain" - and then it's "specific text" containing "mort" - then it works on everything, highlighting/formatting only the single cell.

    If I create a new column to see if "mor" exists in the cells of one particular column, I have used the =IF(ISNUMBER(SEARCH("MOR",$L2)),"MORTGAGE","-") where "L" is the column that contains the data I'm looking for. This works and then it pops in "MORTGAGE" in each cell/row where it's true. THEN I go into conditional formatting and just use the "FORMAT ONLY CELLS THAT CONTAIN" and I use 'specific text' and "MORTGAGE" - and it highlights the entire row of the ones with the correct data.

    All that to say - isn't there a way without having to create a new column etc...and simply give a formula that says if "MOR" or anything like that is in a cell - it can highlight the entire row? I've tried =MOR? and =MOR* - wildcards, whatever.

    Sorry for the length here - any help would be greatly appreciated!
    Thanks

  2. #2
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Conditional Formatting based on partial/specific text to highlight entire row

    Assuming your range starts in row 1, highlight the range of cells you want affected by the conditional formatting, then use this as the formula:

    =SEARCH("*mort*",$L1)

    - Moo

    If it starts in row 2, then change $L1 to $L2, etc...

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Conditional Formatting based on partial/specific text to highlight entire row

    CF has an additional option of "use formula". you can use that for what you want to do.

    before you do tho, test the formula in the sheet itself to make sure it gives you TRUE where you need it (CF works on either TRUE or FALSE)

    using this option, you can incluse just about any regular excel formula, as long as it's constructed to return TRUE or FALSE

    to highlight the entire row, 1st select the entire range you want to apply CF to, then when you reference the "criteria" cell, use absolute (something like $A1)

    If you still have a problem, i would suggest you upload a sample work book, (all sensitive data removed), showing what data you are working with, what your expected outcome is, and how you arrived at that

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    12-05-2012
    Location
    Dallas
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Conditional Formatting based on partial/specific text to highlight entire row

    THANK YOU-THANK YOU-THANK YOU Moo!!!!! Hate that it took me so long - but so very thankful you answered so quickly. Very much appreciated - it worked perfectly.

  5. #5
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Conditional Formatting based on partial/specific text to highlight entire row

    You are welcome, welcome, welcome! Glad I could help.

    - Moo

  6. #6
    Registered User
    Join Date
    05-20-2014
    Location
    https://t.me/pump_upp
    MS-Off Ver
    2010
    Posts
    3

    Re: Conditional Formatting based on partial/specific text to highlight entire row

    i am facing the same issue ... i want to make bold only part of the sentence in a cell by using conditional format to bold sema value in a cell but it makes the whole cell bold.
    can i see the solution that this member had with th mortgage issue?

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Conditional Formatting based on partial/specific text to highlight entire row

    ipolack, welcome to the forum

    1st, Conditional Formatting cannot be used to affect only part of a cell - it either changes all, or nothing.

    2nd, Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

  8. #8
    Registered User
    Join Date
    05-18-2016
    Location
    US
    MS-Off Ver
    2013
    Posts
    1

    Re: Conditional Formatting based on partial/specific text to highlight entire row

    Whew! First link, first response, totally worked for me. Thank you Moo!!! The change they needed before a giant meeting in 7 minutes completed without a sweat.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Conditional Formatting based on partial/specific text to highlight entire row

    Carbone, thank you for the feedback

  10. #10
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Conditional Formatting based on partial/specific text to highlight entire row

    You're quite welcome, Carbone. Glad it helped.

    - Moo

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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