Results 1 to 8 of 8

Thread: Custom excel interval size? Possible or not?

  1. #1

    Thread Starter
    Frenzied Member dinosaur_uk's Avatar
    Join Date
    Sep 2004
    Location
    Jurassic Park
    Posts
    1,098

    Custom excel interval size? Possible or not?

    Hi there,

    I have a question, is it possible to customise the interval size on a chart in excel, let's say the x-axis. Is this possible at all?

    cheers
    If you find my thread helpful, please remember to rate me

  2. #2

    Thread Starter
    Frenzied Member dinosaur_uk's Avatar
    Join Date
    Sep 2004
    Location
    Jurassic Park
    Posts
    1,098

    Re: Custom excel interval size? Possible or not?

    I guess not then

    back to using labels
    If you find my thread helpful, please remember to rate me

  3. #3
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Custom excel interval size? Possible or not?

    sorry, didn't quite understand the question...
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Custom excel interval size? Possible or not?

    i am sure i have done it in the past, you need to format the axis scale

    see if you can do it in the chart, then record a macro to get an idea of the code
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  5. #5

    Thread Starter
    Frenzied Member dinosaur_uk's Avatar
    Join Date
    Sep 2004
    Location
    Jurassic Park
    Posts
    1,098

    Re: Custom excel interval size? Possible or not?

    erm.. but you cant use a macro to make a custom scale?
    If you find my thread helpful, please remember to rate me

  6. #6
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Custom excel interval size? Possible or not?

    if you record a macro of changing the scale you can then modify the code from the macro to put whatever scale you wish

    vb Code:
    1. With ActiveChart.Axes(xlValue)
    2.         .MinimumScaleIsAuto = True
    3.         .MaximumScaleIsAuto = True
    4.         .MinorUnitIsAuto = True
    5.         .MajorUnit = 1.5
    6.         .Crosses = xlAutomatic
    7.         .ReversePlotOrder = False
    8.         .ScaleType = xlLinear
    9.         .DisplayUnit = xlNone
    10.     End With
    if you change the value of minorunit, maximumscale or minimumscale the isauto property for them will change to false
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  7. #7
    Head Hunted anhn's Avatar
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    3,669

    Re: Custom excel interval size? Possible or not?

    Give us an example and tell how you want to it.

  8. #8

    Thread Starter
    Frenzied Member dinosaur_uk's Avatar
    Join Date
    Sep 2004
    Location
    Jurassic Park
    Posts
    1,098

    Re: Custom excel interval size? Possible or not?

    Thanks for the help, I do know how to change a regular interval too

    but i am talking about a irregular scale interval

    so for example, i want it to only display 1 , 5, and 42 on the x-axis
    If you find my thread helpful, please remember to rate me

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width