+ Reply to Thread
Results 1 to 4 of 4

Change row coluor based on cell value

  1. #1
    Registered User
    Join Date
    08-01-2013
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    35

    Thumbs up Change row coluor based on cell value

    Aloha lads.

    I'm almost entirely new to VBA and I'm just looking to make my basic code work at this stage.

    As the title says, I want to change the colour of an entire row based on a cell value in column F. As below.

    - 180 < F => color 15
    - 120 < F < 180 => color 11
    - F < 120 => color 6


    A few notes - which might help.
    - number of columns does NOT vary, it's A-H
    - number of rows varies
    - I normally use a Lastrow variable or the current region around A1 to account for that - please don't change that, I don't know other ones!

    Code below is what I have now, it was put together from google searches but I can't understand sh*t from it, not even what's the bit that I need to customize. So if you want to scrap that and start over, that's fine by me.

    Please Login or Register  to view this content.
    Last edited by JonSnow; 08-11-2014 at 05:35 AM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Change row coluor based on cell value

    Are you sure you need code?

    The formatting you want could easily be done using conditional formatting.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    08-01-2013
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    35

    Re: Change row coluor based on cell value

    Quote Originally Posted by Norie View Post
    Are you sure you need code?

    The formatting you want could easily be done using conditional formatting.
    Yep, I really need code for this one.

  4. #4
    Registered User
    Join Date
    08-01-2013
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    35

    Re: Change row coluor based on cell value

    Hi guys, any help with this?

    I was thinking, if the conditional formatting can be integrated in a Macro (if that makes sense), that would still work for me.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Change the content of a cell based on change the current date
    By aimanraya in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-14-2014, 07:07 AM
  2. Macro to change colour of cell based on finding a specific word in the cell
    By Shelby761 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-24-2014, 09:46 AM
  3. Replies: 3
    Last Post: 11-08-2013, 03:10 PM
  4. Change cell values based on Active Cell Address in Excel 2007 with no VBA
    By bdmistri in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-07-2009, 02:01 PM
  5. Protecting cells by coluor
    By st120869 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-21-2005, 08:35 PM

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