Search code examples
excelvbaexcel-formulainsert

vba inserting/copying range of rows next cell formulas collapse


i am using basic vba code to insert Range(C3:E3").Insert xlShiftDown rows. I discovered that, formulas which are related to these cells, and are in different columns also collapse with inserting range.row (not entire.row). I wonder if there is any workaround with vba code(i mean using insert with different mode) or it is part of excel game we need to figure out to solve our problem without inserting rows. Appreciate any guidance or opinion why it could be so in excel ahead


Solution

  • Can you try cut or paste?

    Range("C3:E3").Select
    Selection.Cut
    Range("C10").Select
    Selection.Insert Shift:=xlDown
    
    Range("C3:E3").Select
    Selection.Cut
    Range("C10").Select
    ActiveSheet.Paste