|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
chr(10)问题得到解决。
- Sub llsss()
- Dim Sht As Worksheet
- Dim Rng As Range
- Set Rng = Selection
- Set Sht = Rng.Parent
- Set oRng = Sht.Cells(Rng.Row, "F").Resize(Rng.Rows.Count, 1)
- Dim Str, Str1, Str2, Str3
- Debug.Print Rng.Address, oRng.Address
-
- Str1 = "= Text(" & Sht.Cells(Rng.Row, "F").Address & ",""" & "yyyy年mm月dd日" & """)"
- Str2 = " count(" & oRng.Address & ")"
- Str3 = " sum(" & oRng.Address & ")"
- Debug.Print Str1
- Debug.Print Str2
- Debug.Print Str3
-
- '"""" &
-
-
- Str = Str1 & " & " & """" & Chr(10) & " Files:" & """ & " & Str2 & " & " & """" & Chr(10) & " SubFolderIDCEs:" & """ & " & Str3
- ' & Str3"
- Debug.Print Str
- 'Debug.Print Rng.Address
- Rng = Str
-
- 'Debug.Print "= Text(" & Sht.Cells(Rng.Row, "F").Address & ",""" & "yyyy年mm月dd日" & """)" & Chr(10) & "& " & " count(" & oRng.Address & ")" & Chr(10) & " & " & " sum(" & oRng.Address & ")"
- End Sub
复制代码
|
|