Results 1 to 3 of 3

Thread: change chart value

  1. #1

    change chart value



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hi,

    I am new in the vba world, and have such issue.

    Need to have vba script that will change chart value, which can be something like this:
    "=sheet_name!$C$4:$C$12,sheet_name!$C$14:$C$22,sheet_name!$C$24:$C$32,sheet_name!$C$34:$C$42"

    the value can select different ranges as you see above seperated by commas.

    My change should be on the first number of each range, for example for the first range: sheet_name!$C$4:$C$12 I might need to change 4 to other number and so

    I splitted the ranges into an array, got each range as seperate array member.
    Now I see several solutions such as
    1. using regexp (which as i noticed is kind of headache in vba scripting
    2. split each member into another array by ":", and then somehow take the last number and increase it
    and so on

    I know this is stupid issue but would love to learn from best experiences, any suggestion for the whole solution or for the last part is appreciated much.

    Regards,
    Sam

  2. #2
    Why do you want to split it up, why not just reset the chart range?

  3. #3
    The input can be from different hundreds of chart, so if i reset what to write, i know which number should be changed and what should be replaced

Posting Permissions

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