Offset/change all row numbers in formulas in selected cells using macro in excel -


i have large number of helper rows taking information different sheet using simple sum function:

=sum('his-wot'!j36,'his-wot'!j82,'his-wot'!j128) 

is there macro out there allow me change/offset row numbers in number of selected cells equal amount (i.e. 221) formula such as:

=sum('his-wot'!j257,'his-wot'!j333,'his-wot'!j349) 

the amount need change various row numbers varies, macro need have dialogue box allowing user choose how user wants increase or decrease row numbers.

thanks!

this code give create dummy sheet copy formulas over, liked question!

sub test()      dim nbr long, cel range, cels range, sh worksheet     set cels = selection      nbr = clng(inputbox("enter offset:"))      set sh = worksheets.add      each cel in cels          if cel.hasformula              sh.cells(cel.row + nbr, cel.column).formular1c1 = cel.formular1c1             cel.formula = sh.cells(cel.row + nbr, cel.column).formula          end if      next      application.displayalerts = false         sh.delete     application.displayalerts = true  end sub 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -