如何把EXCEL单元格中的数字隐藏

2025-05-11 12:29:06
推荐回答(2个)
回答1:

http://jingyan.baidu.com/article/219f4bf7d75b9ede442d388c.html

回答2:

可以使用VBA代码来完成!

详细代码:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$1" Then
If Target = 5 Then
Range("A6:A8").NumberFormatLocal = ";;;"
End If
If Target = 3 Then
Range("A4:A8").NumberFormatLocal = ";;;"
End If
If Target = 9 Then
Range("A2:A8").NumberFormatLocal = ";;;"
End If
End If
End Sub
使用方法:

1、ALT+F11-找到对应的工作表
2、粘贴代码
3、关闭VBE,返回工作表,测试