Move values from range while preserving formulas in Excel VBA -


i'm trying make macro moves values range another, while preserving formulas in range.

so far have this:

sub change_fiscal_year()  sheets("1 income statement").range("e1:e23").value = sheets("1 income statement").range("d1:d23").value  end sub 

it works, copypastes values instead of moving them, formulas not preserved. how can around this?

try this:

sheets("1 income statement").range("e1:e23").formula = sheets("1 income statement").range("d1:d23").formula 

Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -