This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I am trying to insert a formula to a named table using VBA.
The formula uses a vlookup and takes as reference the value on the first column of each row, but for some reason it is giving me an error.
If I type directly de formula there is no issue but if I copy and paste the formula generated the Vlookup gives me an error saying that the syntax is not correct.
The formula is similar to this:
=IF(VLOOKUP([@Test],PR_Status_Table,4,FALSE)="N/A","N/A")
The part that gives a syntax error is [@Test].
Adding the full name of the table does not make any difference.
Upon executing the code it give a 1004 runtime error.
To assign the formula I am using a loop witht his code inside:
output_table.DataBodyRange(i, j).Formula =FArray(j - 1)
Where FArray contains the strings for different formulas.
Subreddit
Post Details
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/vba/comment...