Gordon
Gordon

Reputation: 1651

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?

Upvotes: 0

Views: 55

Answers (2)

iDevlop
iDevlop

Reputation: 25262

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

Upvotes: 1

Ekkehard.Horner
Ekkehard.Horner

Reputation: 38755

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

Upvotes: 0

Related Questions