开发者

Change a row of cells to be a certain formula

I have this row of data with actual numbers.

For a specific reason ... I need to update the same row of cells to do the following:

=(number from cell same)*$J$5

How can i do this开发者_运维技巧?


Range("$J$5").Copy
Range("B9:Z9").PasteSpecial Operation:=xlMultiply

or, if you need a formula that depends on J5:

For Each c In Range("A10:Z10")
    c.Formula = "=$J$5*" & c.Value
Next c


To avoid problems of circular references, just use a copy of the source row.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜