+ Reply to Thread
Results 1 to 4 of 4

Format points on chart according to cell value

  1. #1
    Registered User
    Join Date
    01-12-2015
    Location
    PL
    MS-Off Ver
    2016
    Posts
    29

    Format points on chart according to cell value

    Hi,
    I was asked to add a functionality in the VBA tool I'm working on which will format points on chart according to failure code stored in separate column: Run-outs (D) and Fractures (B), values stored in column D, should be indicated on the chart with different markers. The structure of my data is very simple, 4 columns: A-Stress Amplitude, B-Number of cycles, C-Material Name, D-failure code. The chart is scatter type, where values for the X-axis are in column B, and Y-axis values are in column A. Chart series are generated based on column C: each Material Name has separate series.
    Can you advise me how to code in VBA different formatting of points based on values from column D-Failure Code?

    Thanks in advance
    Regards

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,858

    Re: Format points on chart according to cell value

    Jon Peltier has a routine on his site that will color points by value using VBA: https://peltiertech.com/vba-conditio...arts-by-value/ Will something like that work for you?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    01-12-2015
    Location
    PL
    MS-Off Ver
    2016
    Posts
    29

    Re: Format points on chart according to cell value

    Hi, thanks.
    I've done it this way:
    Please Login or Register  to view this content.
    However the problem is, it does not format all points, only odd entries (e.g 1, 3, 5) in every series. Any idea how to fix this? The FArr array stores string values from column D.
    Last edited by crimsontrooper; 11-25-2019 at 06:23 AM.

  4. #4
    Registered User
    Join Date
    01-12-2015
    Location
    PL
    MS-Off Ver
    2016
    Posts
    29

    Re: Format points on chart according to cell value

    Ok, I've got it to work.
    The line: J = j + 1 was forcing the code to skip the even numbers. After removing this line everything is working correctly.

+ 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] After emailing a sheet with data points and chart it stops updating the chart
    By warehouseman in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-06-2019, 09:46 PM
  2. Replies: 3
    Last Post: 07-17-2018, 08:16 PM
  3. Using VBA macro to format points in scatter chart (by series)
    By DunnoExcel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-24-2016, 11:49 PM
  4. Color chart data points/marker points vba error
    By nmckever in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-12-2014, 07:10 AM
  5. How to format points in chart
    By Andyhg in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-05-2014, 10:57 AM
  6. [SOLVED] Format a chart to automatically update with last 26 data points?
    By laf2day in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-28-2005, 02:40 PM
  7. [SOLVED] Can I format a cell to round a number by 50 basis points (0.5)?
    By daveb in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-18-2005, 09:05 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