【问题标题】:Delete cell if it contains < 3 characters如果单元格包含 < 3 个字符,则删除它
【发布时间】:2013-07-22 08:42:06
【问题描述】:

正如标题所示,如果单元格中的字符数

例如

Row1 Row2 SN DWD

124 411 1 123

32 231 01 23

这里,我想把“SN”、“1”、“32”、“01”和“23”都做成空白单元格。

【问题讨论】:

  • “细胞”?是 Excel 吗?

标签: excel numbers character cells


【解决方案1】:

假设你的意思是 Excel

Sub ClearCellsWithLessThan3Chars()
 Dim cell As Range
 For Each cell In ActiveSheet.UsedRange
    If (Len(cell.Text) < 3) Then
       cell.Clear
    End If
 Next
End Sub

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-05
    • 2019-08-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多