开发者

Change a row of cells to be a certain formula

开发者 https://www.devze.com 2023-02-15 03:05 出处:网络
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:

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

精彩评论

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