最佳答案
这是一个可以处理任意数量列的 VBA 解决方案(假设与每列关联的字母是标准列标签):
Function ZeroColumns(R As Range) As String
Dim n As Long
Dim count As Long
Dim cols As Variant
Dim cell As Range
n = R.Cells.count
ReDim cols(1 To n)
For Each cell In R.Cells
If cell.Value = 0 Then
count = count + 1
cols(count) = Split(cell.Address, "$")(1)
End If
Next cell
ReDim Preserve cols(1 To count)
ZeroColumns = Join(cols, "")
End Function
如果所陈述的假设不成立,那么调整代码应该不会太难。
关于excel - Excel 中的条件连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54896624/