excel单元格引用问题,急!急!急!

来源:百度知道 编辑:UC知道 时间:2024/05/16 15:28:41
如我有A1,B1两个单元格
A1中我设置了可选下拉菜单Y和N
如何实现B1中,当A1为Y时,B1为Y;当A1为N时,B1为N.
同时,B1本身也可以选择Y或N,但不影响A1
也就是说B1可以被A1决定,也可自己输入.

谢谢高手指教!!!!!!!!!
If函数 怎么写呢?

好象只能用宏解决,
如:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cell_row As Integer
If Target.Column <> 1 Then Exit Sub
If Target.Value = "" Then Exit Sub
cell_row = Target.Row
If Target.Value = "Y" Then
Cells(cell_row, 2).Value = "Y"
Else
Cells(cell_row, 2).Value = "N"
End If
End Sub

用if函数