+ Reply to Thread
Results 1 to 6 of 6

Chart Formatting and coding

  1. #1
    Forum Contributor
    Join Date
    04-18-2013
    Location
    utah
    MS-Off Ver
    2010
    Posts
    668

    Chart Formatting and coding

    I a have what you would probably call a scatter chart, my vertical axis is minutes 0 5 10 20 and my horizontal is locations 1-36, what I want to to do is get either the the location number or the dots to highlight anytime a locaction hits over 20 minutes 4 times.

  2. #2
    Forum Moderator - RIP 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
    29,464

    Re: Chart Formatting and coding

    Hi,

    If you upload your workbook we may be able help.
    Richard Buttrey

    RIP - d. 06/10/2022

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

  3. #3
    Forum Contributor
    Join Date
    04-18-2013
    Location
    utah
    MS-Off Ver
    2010
    Posts
    668

    Re: Chart Formatting and coding

    Hope this helps

    Copy of Copy of VL Spreadsheet.xlsx

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

    Re: Chart Formatting and coding

    You've posted this in the VBA forum, so I am guessing you would prefer a VBA solution over the spreadsheet solution I would use for this. However, with an hour gone by since your last post, I'm going to suggest it anyway.

    I would "highlight" a subset of points by adding a second series to the chart. This second series will be formatted as desired to accent those points however you like.

    1) first step is to put the desired formulas into the spreadsheet to create a column for the second series. This formula will
    A) count how many times a given furnace has entries >=20. I would use a COUNTIFS() function for this: =COUNTIFS($A$2:$A$1000,A2,$D$2:$D$1000,">=20"). Maybe in column E.
    B) A simple =IF() function to make a copy of column D if column E is 4 or more. =IF(E2>=4,D2,NA()) Maybe in column F.
    2) Then, add column F as a second series to the chart and format as desired.

    That's how I would do it without VBA. Even if I were doing this with VBA, I would do the same basic thing, only using VBA to perform the countif and put the values in column F.
    Attached Files Attached Files
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Forum Moderator - RIP 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
    29,464

    Re: Chart Formatting and coding

    Hi,

    Here's a start. I've added conditional formatting to your table and a couple of helper columns
    Column E counts the number of times that >=20 and column F contains the number of counts that >4

    Orange identifies those furnaces that have recorded >=20 and the red highlights any where there are more than 4 counts >=20

    I've added some test data in rows 6-12 just to test the red formats. You can of course delete those.

    I'm just pondering how best to put an indication on the chart
    Attached Files Attached Files

  6. #6
    Forum Moderator - RIP 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
    29,464

    Re: Chart Formatting and coding

    @Mr Shorty

    Great minds and all that

    I got sidetracked earlier.

    ...here's an update with the chart showing any relevant Maximum in red. I added another few test rows 13:20 which you may of course remove.
    Attached Files Attached Files

+ 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. Coding Heading in a chart
    By Tempe_VBA in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 04-09-2014, 01:39 AM
  2. using vba coding need to prepare the following chart
    By amu in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-04-2012, 02:07 AM
  3. Color coding a bar chart
    By CherylPorter in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 08-28-2012, 08:55 PM
  4. How to see the chart coding?
    By ramkumar_cpt in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-10-2006, 08:20 AM
  5. how to create chart by VBA coding?
    By Fendic in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-24-2005, 07:10 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