+ Reply to Thread
Results 1 to 9 of 9

Line color change by value in a cell

  1. #1
    Registered User
    Join Date
    09-03-2014
    Location
    Cullman, Alabama
    MS-Off Ver
    2010
    Posts
    31

    Line color change by value in a cell

    I am trying to change the color of a line. if D1 is true then line is red. If E1 is True then line is yellow. Is this done with VBA? or am i making this more difficult than i should?

  2. #2
    Registered User
    Join Date
    08-28-2014
    Location
    india
    MS-Off Ver
    2007
    Posts
    92

    Re: Line color change by value in a cell

    hi jarrettm,
    yes it is possible through VBA, can you post a sample sheet so that we can look in to it.

  3. #3
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Line color change by value in a cell

    Have you tried Conditional Formatting?

    Please attach you sample workbook..
    Cheers!
    Deep Dave

  4. #4
    Registered User
    Join Date
    09-03-2014
    Location
    Cullman, Alabama
    MS-Off Ver
    2010
    Posts
    31

    Re: Line color change by value in a cell

    I will attach in the morning. The file is on the server at work. I do not have access to it at home.

  5. #5
    Registered User
    Join Date
    08-28-2014
    Location
    india
    MS-Off Ver
    2007
    Posts
    92

    Re: Line color change by value in a cell

    Jarrettm, we doesn't want the exact worksheet,i think you have an idea how the worksheet looks and what are the column and rows present,so prepare a sample worksheet by yourself and post it.

  6. #6
    Registered User
    Join Date
    09-03-2014
    Location
    Cullman, Alabama
    MS-Off Ver
    2010
    Posts
    31

    Re: Line color change by value in a cell

    Sample.xlsx this is a quick sample. I tried conditional formatting. i Could only get it to highlight one cell not the line.

  7. #7
    Forum Contributor lancer102rus's Avatar
    Join Date
    04-02-2014
    Location
    Ufa
    MS-Off Ver
    Excel 2010, 2013
    Posts
    252

    Re: Line color change by value in a cell

    Here it is
    SampleCF.xlsx

  8. #8
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Line color change by value in a cell

    Please Login or Register  to view this content.
    with VBA
    Last edited by humdingaling; 09-09-2014 at 02:12 AM. Reason: added extra code to clear all color and strikethrough first
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  9. #9
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Line color change by value in a cell

    FWIW:

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    09-03-2014
    Location
    Cullman, Alabama
    MS-Off Ver
    2010
    Posts
    31

    Re: Line color change by value in a cell

    thank YOu this works great.

+ 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. Cannot change color of line in chart with VBA
    By goudzwaard in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-12-2013, 09:18 PM
  2. How do you change cell border line and color specs using VBA?
    By jimredfield in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-08-2013, 04:43 PM
  3. Change the line color in a graph
    By MarcThibault in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2011, 01:31 AM
  4. Change color of line in line graph
    By ptk in forum Excel General
    Replies: 4
    Last Post: 11-17-2011, 07:57 AM
  5. Replies: 4
    Last Post: 07-05-2006, 11:10 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