1

I'm using VBA in Excel to enter a formula in a specific cell within a table, but don't want the entire column to get this formula.

When doing it manually, Excel gives me the option to 'Undo Calculated Column', but not when it's done through code.

My code is as follows:

Dim url As String
url="https://example.com/myurl"

ThisWorkbook.Worksheets("PO Info").Range("E3").FormulaR1C1 = "=Hyperlink(""" & url & """,""Supplier Portal"")"

Any help would be greatly appreciated.

Harry
  • 57
  • 7
  • 1
    Anything of use here: https://stackoverflow.com/questions/13753563/add-modify-delete-calculated-column-formula-in-excel-listobject-table-via-vba – QHarr Nov 28 '17 at 22:25
  • @QHarr Thanks me for pointing me there, is helpful indeed. – Harry Nov 28 '17 at 22:35

1 Answers1

2

Try:

Application.AutoCorrect.AutoFillFormulasInLists = False
Carol
  • 471
  • 4
  • 7
  • added this line before my code, entered my formula code, then used again this line with =True, works wonders! Thanks much. – Harry Nov 28 '17 at 22:39