excel日期改成字符类型_excel 用宏将日期数字类型的列转换为字符文本列 c#导入excel 日期变成数字 怎么办?这是最好的解决办法...

Sub 宏1()

Dim m As String

For i = 2 To 40000

If Cells(i, 3) <> "" Then

m = Cells(i, 3)

Cells(i, 3).Select

Selection.NumberFormatLocal = "@"

Cells(i, 3) = m

End If

Next

End Sub

Sub 宏1()

Dim AA As String

Dim BB As String

For I = 2 To 5000

If Cells(I, 1) <> "" Then

AA = Cells(I, 1)

BB = Cells(I, 7)

Cells(I, 1).Select

Selection.NumberFormatLocal = "@"

Cells(I, 7).Select

Selection.NumberFormatLocal = "@"

Cells(I, 1) = AA

Cells(I, 7) = BB

End If

Next

End Sub

Sub QUTONG()

For I = 2 To 2000

If Cells(I, 2) <> O Then

If Cells(I - 1, 2) = Cells(I, 2) Then

Rows(I + 1 & ":" & I + 1).Select

Selection.Delete Shift:=xlUp

End If

End If

Next

End Sub

对所有的单元格格式化:

Sub format_string()

Dim m As String

For i = 1 To 60000

For j = 1 To 28

If Cells(i, j) <> "" Then

m = Cells(i, j)

Cells(i, j).Select

Selection.NumberFormatLocal = "@"

Cells(i, j) = m

End If

Next

Next

End Sub

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值