Excel,如何将显示为常量的文本字符串更改为真正的公式?

时间:2018-05-31 14:58:40

标签: excel vba excel-formula

我使用另一个公式修改了一些excel公式,完成后,我复制并粘贴特殊的覆盖原始范围。但它们现在显示为不变。我必须手动点击 <TouchableOpacity style={[styles.buttonLargeContainer, styles.primaryButton]} onPress={() => {}}> <Text style={styles.buttonText}>SEND TO AUCTION?</Text> </TouchableOpacity> const styles = StyleSheet.create({ buttonLargeContainer: { flex: 1, justifyContent: 'center', alignItems: 'center', marginRight: 10 }, primaryButton: { backgroundColor: '#FF0017', }, buttonText: { color: 'white', fontSize: 14, fontWeight: 'bold' } }) 然后F2才能获得该评估。

以下是一个例子:

  • A2最初具有公式return key
  • 然后我使用自定义函数提取公式,如果A2为文本字符串,以便将其修改为=IF(ISNUMBER(B2),B2,0)
  • 现在我将结果复制并粘贴回A列,特殊粘贴为Formula
  • A2现在显示为=B2为字符串/常量,而不是单元格B2的实际值
  • 点击=B2F2后,A2现在解决了B2的真实值。

如何在不手动执行此操作的情况下解决此问题?有数千行!

感谢。

3 个答案:

答案 0 :(得分:1)

您可以检查计算选项是否设置为自动或手动。如果未设置为自动,则进行设置。

enter image description here

答案 1 :(得分:1)

我使用编辑菜单中的find / replace执行此操作,选择相关的单元格,例如找到“(B2)”并替换为“(C2)”。

我加快速度的一种方法是将“= if”替换为“xyxyif”以停止重新计算,然后一旦准备好将“xyxy”替换为“=”......

答案 2 :(得分:0)

选择A列中的任何单元格或选择整个列并尝试:

使用VBA:

Sub test()

' If you know the range, just change "Selection" with the actual range or column

With Selection

    With .EntireColumn

    .TextToColumns , DataType:=xlDelimited, _
        TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
        Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
        :=Array(1, 1), TrailingMinusNumbers:=True

    End With

End With

End Sub