VBA Formula

Important Notice


Please note that on 14th December 2023 users will experience an expected outage whilst we make upgrades to our network. We anticipate this process may take a couple of hours and so we apologise in advance for any inconvenience.

  • I am working on a macro that puts formulas in cell-based on the address. Need help figuring out the issue. below is the line I am struggling with. I have moved the quotes and when I do I get a "sub or function not defined" highlighting the word sum. any help is greatly appreciated.


    Cells(7, iKVI).Value = “=“ & Cells(7, iSum).Address(RowAbsolute:=False, ColumnAbsolute:=False)” & “/SUM(“ & Range(Cells(7, iSales), Cells(LastRow, iSales)).Address & “)”

  • Looks like it should be (but I'm unable to test it):

    Code
    Cells(7, iKVI).Value = "=" & Cells(7, iSum).Address(RowAbsolute:=False, ColumnAbsolute:=False) & "/SUM(" & Range(Cells(7, iSales), Cells(LastRow, iSales)).Address & ")"

    You have an extra double-quote after:

    Code
    ColumnAbsolute:=False)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!