samvelt
New member
- Joined
- Mar 6, 2015
- Messages
- 6
- Reaction score
- 0
- Points
- 0
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
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