VBA Excel数字格式问题 [英] Issue with VBA Excel number formatting
本文介绍了VBA Excel数字格式问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一列大约450,000个9位数字,这些数字用于确定另一列的输出.为什么该过程会识别以数字3而不是0开头的九位数字?
I have a column of about 450,000 9-digit numbers that are being used to determine the output of another column. Why is the process recognizing the nine digit numbers that start with the number 3 but not 0?
Sub Anything()
Dim rng As Range, cl As Range
Set rng = Range("Y2:Y" & Range("Y" & Rows.Count).End(xlUp).Row)
For Each cl In rng.Cells
Dim outCell1 As Range
Set outCell1 = cl.Offset(0, 54)
Select Case Trim(cl.Value)
Case "001019147"
outCell1.Value = "thing1"
Case "311019147"
outCell1.Value = "thing2"
该列中的所有单元格均包含9位数字,尽管该列中大约有450,000个单元格,但仅处理了约2000个.有输入吗?
All the cells in the column contain 9-digit numbers and although there are about 450,000 cells in the column only about 2000 are processed. Any input?
推荐答案
考虑:
选择案例裁切(cl.Text)
这篇关于VBA Excel数字格式问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文