excel - Powershell - add 1 to a string -
the following code:
$search.address().tostring() currently outputs cell locations in format:
$b$5 but want add 1 becomes
$b$6 so far i've tried
$search.address().tostring()+1 but outputs
$b$51 how can add numerical value appears after second $
thanks.
you can regular expression:
c:\ps> [regex]::replace('$b$6', '(\$\w+\$)(\d+)', {param($m) $m.groups[1].value + (1 + $m.groups[2].value)}) $b$7
Comments
Post a Comment