|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
回复 2118楼 hx0682 的帖子
解决了
x = Me.UsedRange.Columns.Count - 1
y = Me.UsedRange.Rows.Count - 1
For i = 1 To x
For j = 1 To y
If file1.Sheets("sheet1").Cells(i, j).Value = str2 And file1.Sheets("sheet1").Cells(i, j).Font.Bold Then
For p = i + 1 To y
If file1.Sheets("sheet1").Cells(p, j).Value <> "" Then '遍歴非空単元格
file1.Sheets("sheet1").Cells(p, j).Hyperlinks.Add file1.Sheets("sheet1").Cells(p, j), "", , str3
End If
Next p
End If
Next j
Next i
换成了对整张Sheet 遍历 并为同列非空值添加超链接 |
|