formula from VBA not working

Nils_Junker

Board Regular
Joined
Jun 2, 2023
Messages
80
Office Version
  1. 365
Platform
  1. Windows
Hi everybody,

my VBA looks like this:
i.e.: table1Sheet.range("D221").Formula2 = "=INDIREKT(ADRESSE(193,VERGLEICH(Dashboard!$P$17,Tabelle1!D2:BD2,0)+3))"
now this brings up the error #NAME
(Formula2 because of the @ which would be added without it)

But if I put the formula in the sheet manually it works.
What is the problem here?
Thanks for your help!
 
Did you try the line of code I supplied?
 
Upvote 0

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
What actually happens when you try the line I suggested?
 
Upvote 0
What actually happens when you try the line I suggested?
1708613765576.png
 
Upvote 0
That's odd, the whole point of formula2local is to use your local settings & language.
Try the two suggestions made by Alex in post#9
 
Upvote 0
That's odd, the whole point of formula2local is to use your local settings & language.
Try the two suggestions made by Alex in post#9
i saw that I forgot to add the Local i tried it before with local but without the ";"
now it works, thank you very much!
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,650
Messages
6,126,014
Members
449,280
Latest member
Miahr

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top