我正在尝试选择具有datalink属性的父级
var url = $(e.target).parents(['data-link']).addClass('selected');
这可能吗?
答案 0 :(得分:1)
是
Sub Demo()
Dim lastRow As Long
Dim cel As Range
With Worksheets("Sheet3") 'change Sheet3 to your data sheet
lastRow = .Cells(.Rows.Count, "R").End(xlUp).Row 'get last row in Column R
For Each cel In .Range("R5:R" & lastRow) 'loop through each cell in range R5 to lase cell in Column R
If cel.Value = "invalid" And Not IsEmpty(cel.Offset(0, 1)) And Not IsEmpty(cel.Offset(0, 2)) Then
cel.EntireRow.Hidden = True 'hide row if condition is satisfied
End If
Next cel
End With
End Sub
不
Sub UnhideRows()
Worksheets("Sheet3").Rows.Hidden = False
End Sub