+ Reply to Thread
Results 1 to 3 of 3

try to add horizonal line in chart via vba

  1. #1
    Registered User
    Join Date
    12-23-2021
    Location
    Boston, USA
    MS-Off Ver
    Mac MS 365 version 16.63.1
    Posts
    57

    try to add horizonal line in chart via vba

    Hi :D

    I cant get a horizontal line added into a chart via vba. If some one could point me to where my error is in the code that ll be very much appreciated!

    There are two series of data:
    series 1: Y values for the first series are in column P (header "y1" on the worksheet), x values are the count of those y values.
    series 2 (horizontal line): Y value is in A1, the x values are in column Q and are equal to the x values of series 1.
    A2 defines the last row ie. the end of the data range for the two series.

    here is the workbook test01.xlsm


    The code has to be compatible with excel for mac.
    Thank you so much in advance!
    Sophia

  2. #2
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,575

    Re: try to add horizonal line in chart via vba

    If just wanting a horizontal line at the Y value in A1, maybe:
    NB: Not tested on a Mac
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-23-2021
    Location
    Boston, USA
    MS-Off Ver
    Mac MS 365 version 16.63.1
    Posts
    57

    Re: try to add horizonal line in chart via vba

    Thanks!!! It works!

+ 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. How to show % on horizonal axis of Pivot Chart
    By Lynneth in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 07-05-2020, 05:46 AM
  2. [SOLVED] Horizonal SUMIfs
    By Jay_hl in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-27-2018, 02:39 PM
  3. Line chart too wide (52 weeks) How to make it the line chart automatically?
    By sovietchild in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 06-26-2016, 08:20 PM
  4. Replies: 3
    Last Post: 06-19-2016, 08:35 PM
  5. [SOLVED] Chart Lengend to show marker style on hidden line - Line chart
    By etaf in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 08-22-2013, 05:19 PM
  6. [SOLVED] Horizonal Line Chart
    By Volsfan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-08-2005, 08:05 AM
  7. Change Line Column Chart to Line Area chart
    By recchie in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 02-23-2005, 11:40 AM

Tags for this Thread

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