+ Reply to Thread
Results 1 to 6 of 6

3 Condition Conditional Formatting

  1. #1
    Registered User
    Join Date
    02-05-2007
    Location
    Bristol, UK
    Posts
    5

    [RESOLVED]3 Condition Conditional Formatting

    I am new to Excel and conditional formatting, but from reading threads and various sites I believe that the conditions have to be in a sort of reverse order.
    The users input would be starting from Row 8.
    Column A & B would be text and Columns C through to AH would be dates in the format 02-Feb-07.

    I am after trying to do the the following:

    Condition 1
    If all cells in a row from Column A through to Column AH are not empty then make text white and backcolor black. (Only in column A would be ideal, but not 100% necessary)

    Condition 2
    If some cells are full and some cells are empty, make the empty cells backcolor Yellow. (Again, it would be nice to make this conditional that the cell in Column A had text in it)

    Condition 3
    I would like to conditionally format the cells Range(C8:AH1000), but until a row is used, by the user adding input through a form or onto the sheet, I would like to have the cells with no backcolor.

    If I could meet this part of Condition 2:
    it would be nice to make this conditional that the cell in Column A had text in it
    then condition 3 would not apply.

    At the moment this is what I have for the 3 conditions:
    Condition 1
    Please Login or Register  to view this content.
    then there is no backcolor
    Condition 2
    Please Login or Register  to view this content.
    then Black backcolor and white text
    Condition 3
    Please Login or Register  to view this content.
    empty cells backcolor = Yellow

    At the moment this doesn't work, either if the complete row is fully used, or if the cells are empty.

    Any pointers in the right direction would be great.

    Thanks
    Last edited by aikidokid; 02-12-2007 at 12:12 PM.

  2. #2
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    you are not to clear in your needs "If all cells in a row from Column A through to Column AH are not empty then make text white and backcolor black. (Only in column A would be ideal, but not 100% necessary)"

    In cell C8

    make text in that row white and background black

    =COUNTBLANK($A8:$AH8)=0

    If some cells are full and some cells are empty, make the empty cells backcolor Yellow. (Again, it would be nice to make this conditional that the cell in Column A had text in it)

    =COUNTBLANK($A8)+COUNTBLANK(C8)=2

    you do not need a third condition

    Regards

    Dav

  3. #3
    Registered User
    Join Date
    02-05-2007
    Location
    Bristol, UK
    Posts
    5
    Thanks for the reply Dav

    I will try to clarify:

    I have the conditional formatting to make empty cells Yellow.

    What I am trying to do is
    • Try to extract the row number - possibly from the WorkSheet_Change event
    • Count how many columns there are (Don't want to hard code this as it could change in the future)
    • If all cells in that row are used, then make the first cell in column A White text and Black backcolor (This is to make it easier for the user to see which row - training record - is already completed, without having to scroll across to check each time)


    If I can do this from conditional formating then great, if not I am guessing I would do this in the Worksheet_Change sub?

    I am very new to Excel, and done a bit of VB, so learning VBA as well.

  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by aikidokid
    Thanks for the reply Dav

    I will try to clarify:

    I have the conditional formatting to make empty cells Yellow.

    What I am trying to do is
    • Try to extract the row number - possibly from the WorkSheet_Change event
    • Count how many columns there are (Don't want to hard code this as it could change in the future)
    • If all cells in that row are used, then make the first cell in column A White text and Black backcolor (This is to make it easier for the user to see which row - training record - is already completed, without having to scroll across to check each time)


    If I can do this from conditional formating then great, if not I am guessing I would do this in the Worksheet_Change sub?

    I am very new to Excel, and done a bit of VB, so learning VBA as well.
    Hi,

    something like
    Please Login or Register  to view this content.
    should go close.

    I have used row 1 as the determining factor for the 'number of columns that exist'

    also note, columns A, B & C need data to fulfil the conditions.

    Let me know how this goes.
    ---
    Si fractum non sit, noli id reficere.

  5. #5
    Registered User
    Join Date
    02-05-2007
    Location
    Bristol, UK
    Posts
    5
    Thanks Bryan

    Sorry I forget to get back to you.

    this was exactly what I was after, and not just that, I have also learnt about how to stop the screen from flickering when updating, which was going to be another question later.

  6. #6
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by aikidokid
    Thanks Bryan

    Sorry I forget to get back to you.

    this was exactly what I was after, and not just that, I have also learnt about how to stop the screen from flickering when updating, which was going to be another question later.
    the old 'screenupdating = False' trick, good to see, and thanks for your feedback.

    ---

+ 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