Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
replacerx to turn Excel column reference into finite range
#2
Macro
Code:
Copy      Help
str s="$A:$BZ"
s.replacerx("^(\$A):(\$BZ)$" "$1$$1:$2$$55555")
out s

In replacerx, the first string is regular expression (rx), the second - replacement.

In rx:
^ - beginning
() - remembers the enclosed part
\$ - $ (because $ is special symbol, it is with \)
$ - end

In replacement:
$1, $2 - first and second remembered parts
$$ - $ (in replacement, $ is special symbol, and $$ is its escape sequence)


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)