Announcement

Collapse
No announcement yet.

[Solved] VBA: Absolute Cell reference in macro

Collapse
This topic is closed.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Solved] VBA: Absolute Cell reference in macro



    Hello everyone, with the following lines of code I'm trying to get the value of cell F:9 multiplied by -1 and returned in the next empty cell. However, it wants to calculate the number of rows up (i.e. "=R[-10]C*-1") rather than using the cell reference F:9. I've tried a couple of things but haven't gotten it yet.

    Range("f65536").End(xlUp).Offset(1, 0).Select
    ActiveWindow.SmallScroll Down:=-1
    ActiveCell.FormulaR1C1 = "=R[-10]C*-1"

    I know this is probably simple. Thanks for the help.

  • #2
    Try

    Range("f65536").end(xlup).offset(1,0).formula = "=F9*-1"

    instead

    HTH, Dzinja

    Comment


    • #3


      Thanks, that worked great!

      Comment

      Working...
      X