This post may contain affiliate links. Please read my disclosure for more info. Power Query Course

Set chart axis min and max based on a cell value

Chart Axis Mix & Max

Not again…” I think to myself every time I change the minimum and maximum values of a chart axis.  It’s such a tedious task, and I know I’ll be doing it again at a future point.  It only takes a few seconds, but all that time starts to add up.  There are various chart objects we can link to worksheet cells; source data, chart titles and data labels can all be linked to cells, but the chart axis is set by hardcoding a number into the Format Axis options window.

Well… I’m not so easily defeated.  I decided to build a more dynamic solution.  I turned to my old friend VBA, and started to tinker.  Below you’ll find the result of that tinkering; a formula which exists on the worksheet to control the min and max values of a chart axis.  Link that formula to a cell and suddenly it is possible to set the chart axis based on a cell value.

Hopefully, by the end of this post, you too can share in the automatic cell linked bliss I now experience.

If you’re not familiar with VBA, don’t worry, I’ll talk you through it step-by-step..

The solution

I wanted a solution which:

  • Updates automatically whenever data changes
  • Does not require user interaction – i.e. no button clicking, but updates automatically when the worksheet recalculates
  • Easily portable between different worksheets

I think I managed to achieve this.

User Defined Functions (UDFs for short) are just like normal Excel functions, such as VLOOKUP or SUM, but they have been created using VBA.  UDF’s are intended to be custom worksheet functions to calculate a cell value.  Whether on purpose or by accident, Microsoft have made it possible to control various objects with UDFs.  For example, it is possible to change a worksheet’s tab color, or to change a chart title (next week’s post).  Thankfully, the minimum and maximum values of the chart axis are controllable using a UDF. Horray!

The solution in action

The animated gif below shows the solution in action.  The values in the cell are automatically applied to the chart.  Whether these values are typed in the cell or created using formulas, they will update the chart.

Chart Min Max In Action

Creating the User Defined Function

To create the UDF click Developer -> Visual Basic (or shortcut ALT + F11).  Follow these instructions if the Developer Tab is not visible.

Developer Visual Basic

The Visual Basic Editor window will open, click Insert -> Module

Chart Min Max Insert Module

Add the code below to the Module as shown.  The code for UDFs must be within a standard module to work.

Chart Min Max UDF Code

The VBA Code

Here is the VBA code to copy into the Module.

Function setChartAxis(sheetName As String, chartName As String, MinOrMax As String, _
    ValueOrCategory As String, PrimaryOrSecondary As String, Value As Variant)

'Create variables
Dim cht As Chart
Dim valueAsText As String

'Set the chart to be controlled by the function
Set cht = Application.Caller.Parent.Parent.Sheets(sheetName) _

'Set Value of Primary axis
If (ValueOrCategory = "Value" Or ValueOrCategory = "Y") _
    And PrimaryOrSecondary = "Primary" Then

    With cht.Axes(xlValue, xlPrimary)
        If IsNumeric(Value) = True Then
            If MinOrMax = "Max" Then .MaximumScale = Value
            If MinOrMax = "Min" Then .MinimumScale = Value
            If MinOrMax = "Max" Then .MaximumScaleIsAuto = True
            If MinOrMax = "Min" Then .MinimumScaleIsAuto = True
        End If
    End With
End If

'Set Category of Primary axis
If (ValueOrCategory = "Category" Or ValueOrCategory = "X") _
    And PrimaryOrSecondary = "Primary" Then

    With cht.Axes(xlCategory, xlPrimary)
        If IsNumeric(Value) = True Then
            If MinOrMax = "Max" Then .MaximumScale = Value
            If MinOrMax = "Min" Then .MinimumScale = Value
            If MinOrMax = "Max" Then .MaximumScaleIsAuto = True
            If MinOrMax = "Min" Then .MinimumScaleIsAuto = True
        End If
    End With
End If

'Set value of secondary axis
If (ValueOrCategory = "Value" Or ValueOrCategory = "Y") _
    And PrimaryOrSecondary = "Secondary" Then

    With cht.Axes(xlValue, xlSecondary)
        If IsNumeric(Value) = True Then
            If MinOrMax = "Max" Then .MaximumScale = Value
            If MinOrMax = "Min" Then .MinimumScale = Value
            If MinOrMax = "Max" Then .MaximumScaleIsAuto = True
            If MinOrMax = "Min" Then .MinimumScaleIsAuto = True
        End If
    End With
End If

'Set category of secondary axis
If (ValueOrCategory = "Category" Or ValueOrCategory = "X") _
    And PrimaryOrSecondary = "Secondary" Then
    With cht.Axes(xlCategory, xlSecondary)
        If IsNumeric(Value) = True Then
            If MinOrMax = "Max" Then .MaximumScale = Value
            If MinOrMax = "Min" Then .MinimumScale = Value
            If MinOrMax = "Max" Then .MaximumScaleIsAuto = True
            If MinOrMax = "Min" Then .MinimumScaleIsAuto = True
        End If
    End With
End If

'If is text always display "Auto"
If IsNumeric(Value) Then valueAsText = Value Else valueAsText = "Auto"

'Output a text string to indicate the value
setChartAxis = ValueOrCategory & " " & PrimaryOrSecondary & " " _
    & MinOrMax & ": " & valueAsText

End Function

That’s all we need to do to create the UDF, now it’s ready to use.

Using the function

The function we have created uses the following syntax:

=setChartAxis(sheetName, chartName, MinOrMax, ValueOrCategory, PrimaryOrSecondary, Value)
  • sheetName = the name of the worksheet which contains the chart.
  • chartName = the name of the chart as a text string, or a cell reference to a text string.  If you’re not sure of a chart’s name, click on the chart and look at the NameBox (the box to the left of the formula bar).
  • MinOrMax = a text string of “Min” or “Max” to select whether the function will control the Minimum or Maximum axis value.
  • ValueOrCategory = a text string of “Value” or “Category” to indicate which axis to adjust (will also accept “X” or “Y”)
  • PrimaryOrSecondary = a text string of “Primary” or “Secondary” to indicate which axis to adjust.
  • Value = a number, or a text string.  A number will adjust the axis to that value, “Auto” will reset the axis to Automatic.

For the function the work, the chart must be in the same workbook as the function.

Unlike normal functions, UDF’s do not display the order of the arguments when typed into the formula bar.  Therefore, the best options are:

  • Start typing the UDF then press Ctrl + Shift + A after typing the first bracket, the arguments will appear.
    Ctrl Shift A to show formula
  • Click on the fx button in the formula bar.  In the Insert Function window select the function under the User Defined list, then click OK.
    select User Defined Function
    The Function Arguments window will show the order and names of the arguments.
    Function Arguments Window v2

The screenshot below shows how the UDF is used:

Display setChartAxis formula in formulabar v2

The formula in Cell G12 is:

=setChartAxis("Sheet1","Chart 2","Min","Value","Primary",E12)

Resetting back to default axis

If you decide to revert back to Excel’s automatic axis calculation, that is no problem.  Any non-numeric value entered as the Value (or in the cell reference linked to the value) will cause the chart to be reset to automatic.

=setChartAxis("Sheet1","Chart 2","Min","Value","Primary","Auto")

Download the example file

Sometimes it is easier to understand by seeing the UDF in action.

Download the file here.

Making the function available in all workbooks

If you wish to make the UDF available in all your workbooks:

  • Include the code above within a new workbook
  • Save the workbook as an Excel Add-in (.xlam file type).
  • Install the Add-in you have created by following these instructions.

The function is now available in all your workbooks.  If others open the workbook they will be able to see the function, but it will not work.  If you want other users to use the function save it in each individual file.

Want to Learn VBA & Macros?

If you want to automate Excel and save time, my recommended resouces for learning VBA Macros are:

85 thoughts on “Set chart axis min and max based on a cell value

    • Excel Off The Grid says:

      Hi Divya,

      The #VALUE! error occurs if there is any error at all, so it could be any number of things.

      The most likely reason is that the chart doesn’t have series with a secondary axis.

  1. Divya says:

    Hi Mark,

    Thanks for your reply.

    It didn’t work when I tried it in the Excel spreadsheet that you have attached as well.

    I may be missing something, I’m not sure what.

      • Mitra says:

        Hi Mark,

        Thank you for this!

        I am experiencing the same issues as Divya. Could you possibly forward the file mentioned above to me as well?


        • Excel Off The Grid says:

          Hi Mitra,

          I have updated the file in the post to show how to use all axis. So if you download the file (see the link in the post) you should be able to see how it works.

    • Hans says:

      Dear All,

      I got the same error.
      Using the fx for help by filling in, it looks that the syntax is a little different.
      You should not use:
      =setChartAxis(chartName, MinOrMax, ValueOrCategory, PrimaryOrSecondary, Value)
      =setChartAxis(sheetname,chartName, MinOrMax, ValueOrCategory, PrimaryOrSecondary, Value)

  2. Benno says:

    Hi there,

    this is a super cool function! Many thanks for setting it up and sharing it… Once you see the code it does not even look that complicated (when it is already there 😉 ). I was wondering if the script could be adapted to also change the units of the graph (stepsize). Any idea what name should be used to refer to the attribute of the major units ?

    Many thanks anyhow, this really helps me.

    Kind regards,


    • Excel Off The Grid says:

      Hi Benno,

      Yes, easy enough to add the units. Add the following code above the line of code which says: ‘If is text always display “Auto”

      'Set Value of Unit Primary Axis
      If ValueOrCategory = "Unit" And PrimaryOrSecondary = "Primary" Then
          With cht.Axes(xlValue, xlPrimary)
              If IsNumeric(Value) = True Then
                  If MinOrMax = "Major" Then .MajorUnit = Value
                  If MinOrMax = "Minor" Then .MinorUnit = Value
                  If MinOrMax = "Major" Then .MajorUnitIsAuto = True
                  If MinOrMax = "Minor" Then .MinorUnitIsAuto = True
              End If
          End With
      End If
      'Set Value of Unit Secondary Axis
      If ValueOrCategory = "Unit" And PrimaryOrSecondary = "Secondary" Then
          With cht.Axes(xlValue, xlSecondary)
              If IsNumeric(Value) = True Then
                  If MinOrMax = "Major" Then .MajorUnit = Value
                  If MinOrMax = "Minor" Then .MinorUnit = Value
                  If MinOrMax = "Major" Then .MajorUnitIsAuto = True
                  If MinOrMax = "Minor" Then .MinorUnitIsAuto = True
              End If
          End With
      End If

      Then to refer to it in the formula, use “Unit” instead of “Value” and use either “Major” or “Minor” instead of “Min” or “Max”.

      Hopefully that’s enough for you to get it working.

  3. Diego says:


    This is amazing stuff! thank you so much.

    I was wondering if you could also make the X axis based on min and max. In your example you have Jan, Feb etc but what if the months were numbers 1 for Jan, 2 for Feb etc (this is my case) and then you want to plot only from Feb to June.

    Let me know if that is possible. Thanks again!

    • Excel Off The Grid says:

      Hi Diego,

      Yes this is possible.

      (1) Right click on the X Axis and click Format Axis… from the menu.
      (2) From the Axis Options select the Data axis option box
      (3) In the formula set the ValueOrCategory argument to be “Category”.

      If the axis labels are text, Excel will assume the first data point will be 1, the second data point will be 2 and so on. So you can still use month names, rather than month numbers.

      • Diego Canal Saez says:

        Hello. Thank you so much for your quick response. The Y axis works perfectly but it seems like the function does not work on the X axis, I keep getting a #VALUE error.

        My graph has 3 sets of data represented with a line and stacked bars. Could that be the problem?

        • Excel Off The Grid says:

          It definiely works. I’ll send you a file with it working.

          You might have been confused by the typo in my last comment. It needs to be a “Date axis”.

  4. Paul says:

    great code works perfect if I don’t protect sheets but I would like to protect all sheet is there any work around for this please?

  5. Chris says:

    This worked beautifully for me. Can I piggyback on this code and make a straight horizontal line at a defined value? Using the series method seems to interrupt the code and caused other issues for me.

    • Excel Off The Grid says:

      Hi Chris,

      I would have thought that having a separate chart series would be your best option. As chart values can already be linked to cells, it would be straight forward to update dynamically.

      • Chris says:

        I can get the line to work and the vba code to work but separately. When I use together the graph displays only one date and no graph on the x axis. The Y axis still functions normally. I looked into the axis information and it now has a bound function that does not work with current coding. How can I adjust bound using vba?

        • Chris says:

          Never mind! I figured it out, there was a data range I had changed and that caused another formula feeding into the UDF to go haywire. Thank you for your assistance

          • Excel Off The Grid says:

            I’m glad you got it working. Apologies for the late response, I had some time off over the holidays.

  6. Randolph says:

    This function is great. I have a scatter plot with an X and a Y axis. How would I change the code to work on the X-axis as well?

    • Excel Off The Grid says:

      In the Category argument of the function use “X” or “Y” for a scatter plot.

      For example:
      =setChartAxis(“Sheet1″,”Chart 1″,”Max”,”X”,”Primary”,B5)

  7. Daniel says:

    The script worked and works perfectly. I am not an Excel guru so I have no idea why but for some reason Excel crashes if you sort a table in a document where your module/code is present. I tested it on 3 separated PC’s with my documents and the example you provide here, tested with Excel 2016 and 2019. It worked one month ago (if it helps)…
    Steps to reproduce:
    – the example document you provide on this page
    – enter some random data, select it and “format as table”
    – sort the new created table
    Result: excel crashes. It does not crash anymore when you delete the module from the file.

    Thanks for the awesome script/code/module. 🙂

    • Excel Off The Grid says:

      Hey Daniel,
      That’s really useful testing, thank you for letting me know.

      I think I’ve been able to identify the problem.

      The code uses “Application.Volatile”, which forces the formula to recalculate everytime there is a change in the workbook. It’s there to avoid some specific unlikely events.

      Obviously, crashing when it sorts is bad, especially as sorting and not an unlikely event. So I recommend removing that line of code (which I will also do in my example file).

  8. Edward says:

    Thank you so much for this, it works perfectly on my copy.
    I have uploaded it to a shared drive and when someone else opens it they get ERROR in the box.
    When I troubleshooted this, I found that if I double-clicked to open the text-box and then enter out it seems to refresh and the error goes away.

    The box contains the formula:
    =setChartAxis(“Chart”,”Weight Chart”,”Min”,”Value”,”Primary”,B1)

    Each person has to re-enable the macros each time it’s opened but this doesn’t seem to change the error.
    Do you know a fix for this?

    • Excel Off The Grid says:

      Hi Edward,

      Are the charts and the code in the same workbooks? If so I’m not sure why it would be causing problems.

      This isn’t exactly a Microsoft supported solution, so there are lots of aspects which we’re still learning about.

      • Edward says:

        They were in the same sheet but I had hidden them behind the chart.
        I’ve now moved the formula to just below and made the text white and it seems to work fine.
        No idea why that’s made a difference but i haven’t had that fault since!

        • Excel Off The Grid says:

          Hi Edward,

          Thanks for sharing your workaround. I have no idea why it would make any difference, but it’s working and that’s the main thing 🙂

  9. Dave says:


    When I try this with two different charts across 2 worksheets it only works for one, the other remains as Auto

    Can you advise?


  10. John says:

    Hi Mark,

    I am trying to use this on a line chart. I have 3 sets of data that are decreasing at a different rate over time. My Y axis is a value in hours remaining. My X Axis is a date range.

    I am able to use the formula to control the Y axis to be set between min 0 and Max based on the maximum stating value compared to my three sets.
    When I try to use it to change the X axis between my start date and my end date i either get #value! or it makes my x axis disappear in my chart. what do you think?

    • Excel Off The Grid says:

      Hi John,

      My guess is that the date axis or the value is text formatted.
      Have you set the X axis as a Date Axis in the Axis Options?

      • Stephanie Krohn says:

        I am having the same issue as John, however, I have set the X axis to Date Axis and have confirmed that the dates I am feeding in are numeric dates (eg. if I perform the operation on the cell “cell + 1” it works: I get a date that is one day after as a result). Any other suggestions?


        • Excel Off The Grid says:

          Hi Steph,

          In the comments below Cat suggest changing each instance of

          IsNumeric(Value) = True


          IsNumeric(Value) Or IsDate(Value)

          I have not had chance to update the post or download file for this yet.

  11. nikki says:

    Hi! This code is displaying the “Value primary max” cell correctly, but it does nothing to edit my chart. any ideas?

  12. Cam says:

    Hi this is great code – however one thing i’ve noticed is that in automatic calculation, the undo function becomes unavailable. I suspect because the function is constantly calculating?

    • Excel Off The Grid says:

      Unfortunately, any time VBA code is run in Excel it clears the undo stack. It will also have the same effect when user defined functions are recalculated.

      It’s just the way Excel is built.

  13. Brandon Suchan says:

    Very helpful formula! Question, how would the formula differ for a chart with both a Primary Y axis and Secondary Y axis?

    Thanks in advance!

    • Excel Off The Grid says:

      Hi Brandon – You would have a formula for each axis. Something like this:

      =setChartAxis("Sheet1","Chart 2","Max","Y","Primary",E12)
      =setChartAxis("Sheet1","Chart 2","Max","Y","Secondary",E13)
  14. John says:

    I can’t seem to get this UDF to work without a #VALUE! error when the chart is a standalone. When the chart is moved to a created sheet1 for example, I can then name the chart and it works appropriately. When the chart is moved to a standalone sheet, the formula no longer works.

    • Excel Off The Grid says:

      Hi John – To use with a Chart Sheet, you’ll just need to change a few sections of the code:

      Define the function like this:

      Function setChartAxis(sheetName As String, MinOrMax As String, _
          ValueOrCategory As String, PrimaryOrSecondary As String, Value As Variant)

      Change the Set cht line as follows:

      Set cht = Sheets(sheetName)

      Remove the Chart name when you call the function. So it will be something like this:

  15. Julio says:

    I have this code partially working. but it keeps displaying me “Category primary Min: Auto”, instead of the cell which I am referencing it. I am trying to modify the X-axis with dates of start and end period. any idea what is the problem?

    • Cat says:

      The existing code doesn’t work with dates because they are not numeric. The code uses IsNumeric(Value) to determine whether to use your value or not, if it is false then it uses the auto scaling, and dates return false.

      I just replaced IsNumeric(Value) with (IsNumeric(Value) Or IsDate(Value)) throughout the code and it worked, e.g:

      ‘Set Value of Primary axis
      If (ValueOrCategory = “Value” Or ValueOrCategory = “Y”) _
      And PrimaryOrSecondary = “Primary” Then

      With cht.Axes(xlValue, xlPrimary)
      If (IsNumeric(Value) Or IsDate(Value)) = True Then
      If MinOrMax = “Max” Then .MaximumScale = Value
      If MinOrMax = “Min” Then .MinimumScale = Value
      If MinOrMax = “Max” Then .MaximumScaleIsAuto = True
      If MinOrMax = “Min” Then .MinimumScaleIsAuto = True
      End If
      End With
      End If

  16. Willem says:

    Great function and for sharing it! I have a strange thing. The function works like a charm when I set it up. When I save (as xlsm) and reopen the formula switches to a #NAME! error whenever I change ANYTHING at all in the sheet. Would you know what this could be? I sort of defies the function of having an automatically updating chart :\

    • Excel Off The Grid says:

      Just to help anybody who is reading this and experiencing the same problem. The issue was caused by macro security settings being set too high, therefore the VBA code was not being executed.

  17. Austin Loutzenhiser says:

    I saw that as of November there was no work around for protecting sheets.. I am wondering if you have come across it between then and now?

  18. Tim Allfrey says:


    Is there any way to get this to work with charts in their own ‘sheet’? Ie chart is in its own tab, not on the same sheet as the function. It doesn’t seem to have a worksheet name at all.



    • Excel Off The Grid says:

      Hi Tim – Thanks for the question. Check out the comments above, as I think this has already been asked.

  19. John says:

    Thanks for your excellent tips and advice.
    I took a shot at enhancing this VBA to allow adjustment of both the x-axis and y-axis units(grid spacing), but messed up and now have both x and y units(grid spacings) changing together.
    I also was trying to get the Vertical and Horizontal axis crossing values to change using .CrossesAt. I can get some functionality, but not very consistently. I have no VBA experience and tried to reverse engineer your VBA to some degree but my lack of coding experience limits what I can do. Could you show us how to add these enhancements? It would be very convenient to get the axis crossovers to also change automatically along with the automatically re-scaled y/x max/min limits. Most plots I generate need the axis crossings at the lower left corner of the plot. Thanks very much for your service.

    • Excel Off The Grid says:

      Hi John – Thanks for the question. Please check out the comments above, as a similar question has already been asked about Gridlines by Benno on 29 November 2018.

      In regard to getting the axis to cross, what chart type are you using? Can you send me an example file.

  20. Patrice Roy says:

    Great function. It works great but … It does something odd to my data. It shows my values way outside the chart. It’s way above the range it’s supposed to be. Any suggestions ?

  21. Christian Aar says:


    Its a great code you have here and it works perfectly, thank you, but I am now using it in a program i have made as part of my thesis. When i sent this program for review to my professor it didnt work he reported.
    I have seen above that protected sheets might cause this problem, and yes it was in fact protected when i sent it. My question however is, if i send it to him again, without protection, will he be able to use the macro like I do or must he add the module himself?

    Thanks in advance

    • Excel Off The Grid says:

      Hi Christian – It depends where the code is located.

      If the code is within a Module within the same Excel file as the graphs then it should work on another PC. If the code is within you Personal Macrobook (or somewhere similar), then it will not work on another PC, they will have to set-up the same formula.

  22. Bret H says:

    Wonderful code. Could you please share some of the syntax required to re-purpose your code for things like reversing the values on an an axis? Or any of the many other modifiable attributes of axes? Thanks.

    • Excel Off The Grid says:

      Excel Charts have a huge Document Object Model, so it would take a long time to list all the options. I have another post about VBA code for charts, which can be found here:

      The macro recorder is always a reasonable option to find the end of the code. Taking your specific example, about reversing the order, the code would be

      cht.Axes(xlCategory).ReversePlotOrder = True
  23. Artur Nagy says:

    Thank you for this awesome code, it works perfectly!
    Two question that I have:

    1.) Why does it limit the workbook’s Undo possibilities to just 1 step (Tested, and after the module is created with the code in a new workbook, I can no longer undo more than 1 step).
    2.) Could anyone please adjust the code or tell me why it limits the Undos?

    Thank you very much,

    • Excel Off The Grid says:

      Unfortunately, any time VBA code is run in Excel it clears the undo stack.

      We would all like an Undo feature for macros, but it’s just the way Excel is built.

  24. Y says:

    Thank you. For some reason, all I get is #VALUE!. I already downloaded your file and it looks exactly like mine.
    My chart has two primary Axis and one secondary. I am trying to set the max value on the secondary axis. i would greatly appreciate if you can please help out.

  25. Y says:

    Please Disregard my previous post. All I was missing was a space in the chart name.
    It works wonderfully!
    Thank you so much!

  26. Y says:

    Here I am again.
    I have the min set to 0 and the max is based on the value of a specific cell. The issue is that if for example the max value is 87,500, the highest axis number on the chart will be 80,000 because it goes by 10 or 20 etc. increments. Is there a way to have the lowest axis number 0 and the highest based on the value (in this example 87,500) and all in between should be equally divided between 0 and 87,500

    • Excel Off The Grid says:

      Look at some of the comments above, which detail how to adapt the macro to set the major and minimum unit. You’ll need the Major Unit to be 87,500, then the Minor Unit to be the units in between.

    • Excel Off The Grid says:

      The most likely causes of #NAME errors are:
      (1) Typo in the formula name
      (2) Missing double quotes around a text value
      (3) Trying to use a named range which doesn’t exist

  27. GregM says:

    Thanks for the great code and the great support and explanations!
    Wish I had such a great understanding of Excel and VBA.

  28. Neil Marshall says:

    Hi EOFG,

    Thanks for sharing the code, it works well and is the first time I’ve come across User Defined Functions.

    I’m trying to update my workbook so that your function refences the current sheet name and chart name, so that it will continue to work if a sheet is copied.
    So far, I’ve used the function “=MID(CELL(“filename”,A1),FIND(“]”,CELL(“filename”,A1))+1,255)” in a cell to give the sheet name, and am then pointing your function at the cell. By not hard-coding the tab name it means that the function continues to work if the tab name is changed.

    I was hoping to do the same with the chartname. I can see the new chart name in the name box when selected, but couldn’t find a way to extract this info into a cell using a function.

    Did you have any pointers?

    Cheers NM

    • Excel Off The Grid says:

      In it would be possible to write a UDF to get the chart name into a cell, but I’m not sure this is necessary. Using the name box, you can rename a chart. It may say “Chart 1” in the name box, but you can overtype this and press enter. This will fix the chart name to whatever you need it to be.

  29. erick says:

    You have explained your chart axis vba perfectly.

    Your code is a real time saver. I simply wanted to thank you for providing the code and saving me mental ordeals.

    Thanks again.

Leave a Reply

Your email address will not be published. Required fields are marked *