Excel VBA: How to Insert formula into an area of cells?

后端 未结 2 941
被撕碎了的回忆
被撕碎了的回忆 2021-01-27 08:46

Problem

I need to insert some formulas into a 2 dimensional area of cells with VBA. For example below

2条回答
  •  故里飘歌
    2021-01-27 09:26

    Range("yourrange").Formula = "=Sum(whatever)"
    

    where yourrange is a Named Range, or for an actual reference

    Range("A1:F8").Formula = "=Sum(whatever)"
    

提交回复
热议问题