Question : Excel Make a cell mandatory based on entry in another cell

I am trying to create a data entry worksheet in excel 2003 where in I need to validate a cell based on entry in anther cell.

For example, if A1 is entered, I need to make sure that B1 is also entered.  I understand that I will have to write a data validation rule in B1 to check if A1 is entered.  But my concern how do I copy the formula to other cells in the column as I will not be knowing exact number of rows user will be filling.  In other words, how do I set the data validation formula to take effect for the complete column?  

Thank you for all your inputs.

Answer : Excel Make a cell mandatory based on entry in another cell

Thanks Dave

Will this Do?
Also please tell me, what if some one pastes over A1 (validation cell)

Ritesh
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
Private Sub Worksheet_Change(ByVal Target As Range)
For Each cell In Target
If cell.Address Like "$A$*" And cell.Value <> "" Then
    Debug.Print Replace(cell.Address, "A", "B")
    If Range(Replace(cell.Address, "A", "B")) = "" Then
        MsgBox ("Please fill Column B First")
        cell.ClearContents
    End If
End If
Next cell
End Sub
Open in New Window Select All
Random Solutions  
 
programming4us programming4us