带有SEERRO的错误1004 FormulaLocal [英] Error 1004 FormulaLocal with SEERRO
问题描述
我正在尝试使用vba将公式插入工作表中的单元格.我相信可以使用下面的公式来完成此操作,但不幸的是,我不知道如何在下面修复我的语法.
I am trying to use vba to insert a formula into cell on my Sheet. I believe it can be done with the formula I have below, but unfortunately I do not know how to fix my syntax below.
FormulaLocal语法出了什么问题?
What's wrong with my FormulaLocal syntax?
奇怪的是,使用R.Formula可以正常工作,但是单元格显示错误#NAME
The strange thing is that using R.Formula, it works, but the cell gets the error #NAME
Sub InsertIFERROR()
Dim R As Range
Set R = Application.InputBox("Select a range", "Get Range", Type:=8)
R.Select
For Each R In Selection.SpecialCells(xlCellTypeFormulas)
R.FormulaLocal = "=SEERRO(" & Mid(R.FormulaLocal, 2) & ",""-"")"
Next R
End Sub
推荐答案
请特别注意Excel的区域版本.PT-PT版本使用 SEERRO (通常是逗号作为列表分隔符)
Be especially careful about the regional version of your Excel. The PT-PT version uses SE.ERRO with a semicolon as a list separator while the PT-BR version uses SEERRO (and typically a comma as a list separator).
这篇关于带有SEERRO的错误1004 FormulaLocal的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!