Multiple values in Private Sub Worksheet_Change(ByVal Target As R
I've made it this far, but I need a little help. I've written the following
but I would also like to look at column O for a value of "Trade". Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Range("q:q"), Target) Is Nothing Then If Target.Value = "r" Or _ Target.Value = "w" Then Range("t" & Target.Row).Select End If End If End Sub |
Multiple values in Private Sub Worksheet_Change(ByVal Target As R
In the same row?? If so:
If Target.Value = "r" Or Target.Value = "w" Then if target.offset(0,-2).value = "Trade" then Range("t" & Target.Row).Select else ' what do you do if it isn't trade? end if End If "davemon" wrote: I've made it this far, but I need a little help. I've written the following but I would also like to look at column O for a value of "Trade". Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Range("q:q"), Target) Is Nothing Then If Target.Value = "r" Or _ Target.Value = "w" Then Range("t" & Target.Row).Select End If End If End Sub |
Multiple values in Private Sub Worksheet_Change(ByVal Target
Works like a charm. Thank you!
My brain doesn't hurt quite as much now. Dave "Duke Carey" wrote: In the same row?? If so: If Target.Value = "r" Or Target.Value = "w" Then if target.offset(0,-2).value = "Trade" then Range("t" & Target.Row).Select else ' what do you do if it isn't trade? end if End If "davemon" wrote: I've made it this far, but I need a little help. I've written the following but I would also like to look at column O for a value of "Trade". Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Range("q:q"), Target) Is Nothing Then If Target.Value = "r" Or _ Target.Value = "w" Then Range("t" & Target.Row).Select End If End If End Sub |
All times are GMT +1. The time now is 05:58 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com