标签:
首先把所有的数字录入(或者导出为)井号+数字的格式,比如“#3333333323424234234234”,然后运行下面的宏:
Sub Num2Text() If Not TypeOf Application.Selection Is Range Then MsgBox "You must select cells!" Return End If For Each cell In Application.Selection.Cells If cell.Text <> "" Then cell.FormulaR1C1 = "‘" + Replace(cell.Text, "#", "") End If Next End Sub
Excel 用于批量把单元格设置为"文本格式保存的数字"的宏
标签:
原文地址:http://www.cnblogs.com/mopno1/p/4337852.html