First, name the cell that contains your validation list. Working wit
cell coordinates gets messy as your database gets larger. Also, if you
cell moves, then the reference changes.
The 'offset' command seems to be what you're looking for. It applies t
a cell with respect to another. The syntax is
Range("WhateverCell").offset(Number of rows, Number of colums)
If the number of rows, or columns, is 1, the next row or column will b
selected. If the varible is -1, the previous row or column i
selected.
In this example, I've named the cell D4, "valid1".
Sub ValidationChange
If Range("Valid1").Value = "AAA" Then 'range D4
With Range("valid1")
.offset(0,1).value = 0 'range E4
.offset(0,2).value = 0 'range F4
.offset(0,3).value = 0 'range G4
End With
End If
End Sub
- Gitcyphe
--
Message posted from
http://www.ExcelForum.com