+ Reply to Thread
Results 1 to 3 of 3

VBA trying to colour cell based on value in other cell

  1. #1
    Registered User
    Join Date
    11-28-2019
    Location
    Perth, Australia
    MS-Off Ver
    Office 365 ProPlus
    Posts
    2

    VBA trying to colour cell based on value in other cell

    Hi Guys and Gals,
    I'm only just starting to learn VBA so i may be way off with this but hoping someone can help.
    Basically what i'm trying to do is fill the ActiveCell colour based on the value of another cell in the same row.
    I dont want to use conditional formatting as once i understand how to make this work, i'll be building formulas into the macro to enter data into other cells etc.

    the code I have so far is as follows

    Please Login or Register  to view this content.
    for reference here's the sheet i'm working with - the goal is that if the value in column L "SUSPEND QTY" of the same row is >1 then colour the cell red
    I currently only want it to work on the activecell and nothing more; I'll get it to loop through the list later down the track.
    =vba1.JPG

    thanks in advance
    Pete
    Last edited by davesexcel; 11-29-2019 at 11:47 PM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480

    Re: VBA trying to colour cell based on value in other cell

    If SUSPEND_QTY.Row > 1

    This is asking if a row>1, not if a cell value >1

    The picture supplied shows the active cell in column Y.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-28-2019
    Location
    Perth, Australia
    MS-Off Ver
    Office 365 ProPlus
    Posts
    2

    Re: VBA trying to colour cell based on value in other cell

    Thanks so much Dave! Totally makes sense now

+ 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. [SOLVED] Changing text colour in a cell based on value or colour of another cell.
    By Jeankartel in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-15-2019, 07:16 PM
  2. [SOLVED] colour of cell in table based on colour of same value cell elsewhere
    By tommy060289 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-10-2019, 05:50 AM
  3. [SOLVED] format a cell background colour based on a manual background colour of an adjacent cell
    By Nampara in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-24-2018, 04:03 PM
  4. Replies: 6
    Last Post: 04-11-2016, 09:48 AM
  5. Changing the colour of a cell based on the colour of another cell
    By Pete2931 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-11-2012, 03:35 AM
  6. [SOLVED] Colour results cell based on cell colour of Min( )
    By EricofPendom in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-10-2012, 03:33 AM
  7. Replies: 3
    Last Post: 07-15-2010, 08:49 AM

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