1

I have a project in which I need to use VBA to create a formula that links cells together. The line of code I am using to do this is:

wb1.Sheets("Sheet2").Range("A1").Formula = "=[File Name]Sheet1!D100:D120

When I use that line of code, I get a value error and the formula bar of cell A1 looks like this:

"=@[File Name]Sheet1!D2900:2902"

Removing the "@" gets rid of the error and the formula works fine.

I would love some help in making it so that excel doesn't automatically insert the @ sign when I run the code. Thanks!

Tom B
  • 11
  • 1

0 Answers0