Consulting

Results 1 to 6 of 6

Thread: Solved: Conditional formatting query

  1. #1
    VBAX Regular
    Joined
    Mar 2011
    Posts
    7
    Location

    Solved: Conditional formatting query

    Hi there,

    Could somebody please help me with a conditional formatting query?

    I would like to do the following;

    If I have a row of data from A2 through to T2, then I would like all cells A2 - T2 to be bordered if A2 is not blank (if A2 is blank then no border on cells), I then need this conditional formatting rule to be copied down to row 200.

    Any help gratefully received

    Thanks

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Select A2:T200, go to CF, add a formula of

    =A2<>""

    and then set the formatting as required.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Regular
    Joined
    Mar 2011
    Posts
    7
    Location
    Quote Originally Posted by xld
    Select A2:T200, go to CF, add a formula of

    =A2<>""

    and then set the formatting as required.
    Thanks xld, that works if I want the whole range to be formatted if there is a value in cell A2. I should have explained better.

    I would like each row to be formatted if column A for that row is not blank.

    e.g. if A2<>"" then A2 - T2 get formatted then same for next row

    if A3<>"" then A3 - T3 get formatted all the way down to row 200

    I hope this is more clear, apologies

    Francri

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    That is exactly what I gave you. As long as you enter $A2, not $A$2 it will vary depending upon A2, A3, ...
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    VBAX Expert shrivallabha's Avatar
    Joined
    Jan 2010
    Location
    Mumbai
    Posts
    750
    Location
    Even then you can use Bob's Formula. Only change that you need to do is to set the above formula for Cells A2 and T2. Once you are done with that Copy these two cells and then do Paste Special [Formats] upto Cells A200.

    Excel will automatically update the formula.
    Regards,
    --------------------------------------------------------------------------------------------------------
    Shrivallabha
    --------------------------------------------------------------------------------------------------------
    Using Excel 2016 in Home / 2010 in Office
    --------------------------------------------------------------------------------------------------------

  6. #6
    VBAX Regular
    Joined
    Mar 2011
    Posts
    7
    Location
    Quote Originally Posted by xld
    That is exactly what I gave you. As long as you enter $A2, not $A$2 it will vary depending upon A2, A3, ...
    Thanks xld, I had been using $A$2 without even thinking.

    very much appreciated. I will mark as solved.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •