+ Reply to Thread
Results 1 to 6 of 6

Format entire row based on cell contents

  1. #1
    Registered User
    Join Date
    04-29-2008
    Location
    Oxfordshire, England
    MS-Off Ver
    Excel 2010
    Posts
    16

    Question Format entire row based on cell contents

    Hope someone here can help, What i would like to do is change the background colour for an entire row based on one cell Which will say 'Yes' or 'No'.

    Basically we have 2 sales methods So along with all the other data there is a column that asks if the sales method is direct? I would like it so if they enter yes then it would change the background colour of all the cells in that row to grey.

    In fact, what would make if even better is if we could have a drop down list for them to choose Yes or No from rather than type it, but i'm not sure how to do that or if it's possible...

    Thanks for your help,


    Tim.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Select your entire range and invoke the Conditional Formatting feature from the Format menu.

    Select Formula Is from 1st drop down and enter formula:

    =$A1="Yes" where A1 is the top most cell in your select where the word "yes" is to appear. Change as necessary.


    Click Format and select your background colour.

    Click Ok, click Ok again to finish.

    To get the drop down yes/no validation... go to Data|Validation and select List from the Allow menu and in the Source box type: Yes,No
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor ptm0412's Avatar
    Join Date
    04-16-2008
    Location
    Vietnam
    MS-Off Ver
    Office 2003 and 2007
    Posts
    129
    I think I could do it.
    First you use conditional formating to color the row, then use validation to make a list of Yes or No to choose.
    I also made a sample.
    Attached Files Attached Files
    Oldman Chatting: [email protected] Mailing: [email protected]

  4. #4
    Registered User
    Join Date
    04-29-2008
    Location
    Oxfordshire, England
    MS-Off Ver
    Excel 2010
    Posts
    16
    Thanks - Thought it would be much more complicated than that!

    How would i then copy this to work on a row by row basis for the entire worksheet?

    Also, what do i need to enter if e.g. i wanted it to turn red if someone entered 'Maybe'.

    Thanks again,

    Tim.

    p.s. Thanks for the drop down list info.... so simple, yet i've never used it!
    Last edited by Timja; 05-13-2008 at 11:09 AM.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Well if you select the entire range like I said, you shouldn't have to copy the formatting... but if you didn't, then copy the entire row, select where you want to copy the formatting and go to Edit|Paste Special and select Formats....

    To copy the Validation, select the cell with the validation and copy it.. go to cell(s) to copy to and then go to Edit|Paste Special and select Validation.

    To add another condition, re-invoke the CF dialogue and click Add, repeat the formula except use $A1="Maybe". Click Format and pick Red.

    To add "Maybe" to your list, just re-invoke Data Validation and add Maybe to the Yes,No list.

  6. #6
    Registered User
    Join Date
    04-29-2008
    Location
    Oxfordshire, England
    MS-Off Ver
    Excel 2010
    Posts
    16

    Thumbs up

    Fantastic, thanks for that! I thought i would have to do just the one row then paste it, rather than select the entire worksheet when initially doing the conditional formating... Also, forgot you can just add another condition - Thought it had to be in the same formula!

    Sorry about that - been ages since i last used that feature!

    Thanks again to both of you,


    Tim.

+ 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