Problem
I need to insert some formulas into a 2 dimensional area of cells with VBA. For example below
Of course I can do this for 1 row with VBA using the .Formulas = "=Sum(....)"
but how can I include an area instead of just a range? This seems so trivial but开发者_JAVA百科 I can't seem to figure it out. I'm trying to avoid using a loop to fill out every row.
Range("yourrange").Formula = "=Sum(whatever)"
where yourrange
is a Named Range, or for an actual reference
Range("A1:F8").Formula = "=Sum(whatever)"
range("A1:G10").formula = "=Sum(H1:H10)"
Fill in your own range/formula
精彩评论