current code is
lngLastRowDPWK = ActiveSheet.Cells(Activesheet.Rows.Count,"DX".End(xlUP).Row+3
Range("DP" & lngLastRowDPWK:"DV" & lngLastRowDPWK +2).select
I'm wanting it to highlight a few rows of in columns DP-DV but the row number is a variable. Any help is appreciated. Thank you
答案 0 :(得分:1)
Sub test()
'You were missing a ")"
lngLastRowDPWK = ActiveSheet.Cells(ActiveSheet.Rows.Count, "DX").End(xlUp).Row + 3
'You weren't creating the string correctly
Range("DP" & lngLastRowDPWK & ":DV" & lngLastRowDPWK + 2).Select
End Sub