+ Reply to Thread
Results 1 to 8 of 8

Change the color of a row in a specific range

  1. #1
    Registered User
    Join Date
    01-02-2013
    Location
    Orem, UT
    MS-Off Ver
    Excel 2010
    Posts
    58

    Change the color of a row in a specific range

    If I wanted to color the color of a specific range in a row if you enter "yes" or "no". What is the formula to do that?

  2. #2
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    28,115

    Re: Change the color of a row in a specific range

    Hi,

    You will need to use conditional formatting and the 'Use a formula....' option

    The formula would be

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and in the 'applies to' box enter the range concerned. e.g. E1:Z1, or if you want this to apply in a range of rows apply it to the range, e.g E1:Z100
    Richard Buttrey

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    50,901

    Re: Change the color of a row in a specific range

    you can do that with conditional formatting, but it is impossble to suggest a formula without seeing the data you are working with.

    give a try yourself though...
    1. highlight the range you want to apply the conditional formatting to
    2. on the home tabe, styles, select CF
    3. select new rule, select use formula
    4. enter =$A1="Yes" format fill as needed

    If this doesnt work for you,
    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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
    01-02-2013
    Location
    Orem, UT
    MS-Off Ver
    Excel 2010
    Posts
    58

    Re: Change the color of a row in a specific range

    I'm kind of new to all this. Let me try to explain. All of the titles for may worksheet are on cells A1 and across. Let use for example A1:A10. So I enter the data from B2:B10. So what I want the formula to do is if I enter a "yes" on cell B7 I want it to turn that whole range of cells Green. And if I enter a "No" I would like it to automatically turn the whole range Red. Does that make more sense?

  5. #5
    Registered User
    Join Date
    01-02-2013
    Location
    Orem, UT
    MS-Off Ver
    Excel 2010
    Posts
    58

    Re: Change the color of a row in a specific range

    I'm kind of new to all this. Let me try to explain. All of the titles for may worksheet are on cells A1 and across. Let use for example A1:A10. So I enter the data from B2:B10. So what I want the formula to do is if I enter a "yes" on cell B7 I want it to turn that whole range of cells Green. And if I enter a "No" I would like it to automatically turn the whole range Red. Does that make more sense?

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    50,901

    Re: Change the color of a row in a specific range

    yes, I think we understand what you want. follow the instructions and you will get there

    lets assume that your data goes across to column E
    1. highlight the range A2:E10
    2. on the home tabe, styles, select CF
    3. select new rule, select use formula
    4. enter =$B2="Yes" format fill GREEN
    repeat 3 and 4
    4. enter =$B2="No" format fill RED

    If you still have a problem, upload a sample workbook for us to look at
    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.

  7. #7
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Change the color of a row in a specific range

    which Range, A1:A10 or B2:B10 or row 7 or...?
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  8. #8
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Change the color of a row in a specific range

    aah, looks like FDibbins has it covered

+ 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