automatically deleting data, using macros
You can continue using your If statement. If only one crtieria, you could
just use "Else", or you can nest more If statements if needed. To delete
data, try:
Range("F6").ClearContents
Possible new macro:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B3")) Is Nothing Then Exit Sub
Rows("6:47").EntireRow.Hidden = False
If Range("B3") = "Standardized Module Width" Then
Rows("6:6").EntireRow.Hidden = False
Rows("15:15").EntireRow.Hidden = False
Else
Range("F6").ClearContents
end if
end if
end sub
--
Best Regards,
Luke M
*Remember to click "yes" if this post helped you!*
"Derrick" wrote:
i have some code on the bottom of one of my sheets, something like this:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B3")) Is Nothing Then Exit Sub
Rows("6:47").EntireRow.Hidden = False
If Range("B3") = "Standardized Module Width" Then
Rows("6:6").EntireRow.Hidden = False
:
Rows("15:15").EntireRow.Hidden = False
end if
end if
end sub
:
Im wondering if its possible to delete the information in cells, eg: F6,
F15, ... when another option is selected - so not Standardized module width
- i have 3 options...
can anyone help?
|