发布网友 发布时间:2022-04-22 05:17
共2个回答
热心网友 时间:2022-07-12 22:56
vba * 你值得拥有
先上个效果图
Sub CreateUrl()
Dim urlHead As String
urlHead = "http://.com/"
Dim url As String
Dim urlStr As String
Dim i As Long
Dim j As Long
Dim n As Long
Dim wsh As Worksheet
Set wsh = Workbooks("Book1").Worksheets("Sheet1")
n = wsh.Range("A:A").Find("*", , , , xlByRows, xlPrevious).Row
For i = 2 To n
urlStr = urlHead & wsh.Cells(i, 1) & ".jpg"
For j = 1 To wsh.Cells(i, 2)
url = urlHead & wsh.Cells(i, 1) & "_" & Right(Str(j + 100), 2) & ".jpg"
urlStr = urlStr & Chr(10) & url
Next
wsh.Cells(i, 3) = urlStr
Next
End Sub
热心网友 时间:2022-07-12 22:56
用vba处理,省时省力