+ Reply to Thread
Results 1 to 4 of 4

Conditional formatting - If cell contains text then insert border for that row - multiple

  1. #1
    Registered User
    Join Date
    05-03-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    11

    Conditional formatting - If cell contains text then insert border for that row - multiple

    Good Morning

    I have a spread sheet where i would like a range of cells highlighted if a certain cell contains text (using conditional formatting).

    So if cell A6 contains text then A6:P6 will automatically have a border put around it. I have found a formula to do this:

    =COUNTA($A$6)>0

    However i would like this formula to do the same for multiple rows, e.g. cells A6:A8 all contain text then borders will be placed around each cell between A6:P8, but cell A9 does not contain text, so I do not want A9:P9 to be bordered.

    At the moment I can insert the formula for each row, however there are hundreds of rows and this will take a long time to do this.

    Is there a simpler way to do this?

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Conditional formatting - If cell contains text then insert border for that row - multi

    If your formula works for you, then use just relative reference..

    =COUNTA($A6)>0 . Adjust your range to A6:D1000(FOR EXAMPLE)

    OR use

    =istext($a6) in Conditional Formatting rules..
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    05-03-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Conditional formatting - If cell contains text then insert border for that row - multi

    I have attached an example

    The current formatting is set up by row from 19:35

    If there is text in Column A, then the cells in that row up until Column R become bordered. If there is no text in the first column, then no border is applied. I am looking for a formula to continue this type of formatting over numerous rows, rather than seperate formatting for each row, if that makes sense.
    Attached Files Attached Files

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Conditional formatting - If cell contains text then insert border for that row - multi

    Using your formula as i suggested.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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