Hello Dear community,
I have string with list of ranges, I want to check each cell to use if statement. If cell.address within that string, then run code. Normally InStr could handle it, but problem is String is as following:
I tryed to:
Result is not correct, if even it would work, it can't find for example $S$15 if even that's within range.
Can anyone help me to figure out how to check that? S is only column within range.
I have string with list of ranges, I want to check each cell to use if statement. If cell.address within that string, then run code. Normally InStr could handle it, but problem is String is as following:
VBA Code:
myRng.address = "$S$1,$S$14:$S$16,$S$18,$S$20,$S$25,$S$27,$S$32,$S$45,$S$48,$S$64:$S$65,$S$68,$S$70:$S$71,$S$79:$S$81,$S$83:$S$124,$S$126:$S$141,$S$143:$S$201,$S$205:$S$207,$S$209,$S$211:$S$261,$S$263:$S$265,$S$269:$S$284,$S$286:$S$289,$S$293:$S$305,$S$307:$S$317"
I tryed to:
Code:
If InStr(1, myRng.Address, "$S$" & calculatedDatarow & ":") then
Can anyone help me to figure out how to check that? S is only column within range.