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

后端 未结 2 940
被撕碎了的回忆
被撕碎了的回忆 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)"
    
    0 讨论(0)
  • 2021-01-27 09:36

    range("A1:G10").formula = "=Sum(H1:H10)"

    Fill in your own range/formula

    0 讨论(0)
提交回复
热议问题