Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row < 7 Or Target.Row > 100 Then Exit Sub
ar = Target.Row
Application.EnableEvents = False
If UCase(Cells(ar, "c")) = "Y" Then Cells(ar, "b") = ""
If UCase(Cells(ar, "d")) = "Y" Then Cells(ar, "c") = ""
Application.EnableEvents = True
End Sub
--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Don Guillett" <(E-Mail Removed)> wrote in message
news:e$(E-Mail Removed)...
> right click sheet tab>view code>insert this>modify to suit>SAVE
>
> Private Sub Worksheet_Change(ByVal Target As Range)
> If Target.Row < 7 Or Target.Row > 106 Then Exit Sub
> ar = Target.Row
> If UCase(Cells(ar, "ac")) = "Y" Then Cells(ar, "s") = ""
> If UCase(Cells(ar, "ai")) = "Y" Then Cells(ar, "ac") = ""
> End Sub
>
> --
> Don Guillett
> SalesAid Software
> (E-Mail Removed)
> "Digital2k" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Thank you Ken,
>> I did exactly as you described but it did not work for me.
>> I should have given you more info.
>> I have a worksheet with 100 rows from 7-106 that I want to include and
>> three columns S, AC, AI that I want to use for this formula or macro.( I
>> have other data in the other cells)
>> If S7 has a "Y" and I insert a "Y" in AC7 I would like "Y" from S7 to be
>> removed. If I insert a Y in AI7 I would like AC7 to be removed.
>> In other words There should only be one y in either cell mentioned for
>> that row.
>> I would like all 100 rows to have the same function but not effect other
>> rows. If I insert a y in cell AI7 I want S7 or AC7 to have a y removed,
>> S8 or AC8 should not be effected unless I insert y in that row.
>> I hope I made myself a little clearer. Is this even possible to do?
>> Thanks so much in advice
>> Digital2k
>>
>> "Ken Johnson" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Hi Digital2k,
>>>
>>> I think you will have to use a WorksheetChange Event Procedure to
>>> achieve that.
>>>
>>> Something like...
>>>
>>> Private Sub Worksheet_Change(ByVal Target As Range)
>>> If Not Intersect(Range("A1:C1"), Target) Is Nothing Then
>>> With Application
>>> .ScreenUpdating = False
>>> .EnableEvents = False
>>> End With
>>> If Range("B1") = "Y" Then Range("A1") = ""
>>> If Range("C1") = "Y" Then Range("B1") = ""
>>> End If
>>> Application.EnableEvents = True
>>> End Sub
>>>
>>> This code has to be pasted into the Code Module of the affected
>>> worksheet. If you copy the code then right-click your worksheet's sheet
>>> tab, then choose "View Code" from the popup menu, you can paste it into
>>> the code module that appears.
>>>
>>> Your security level will have to be medium (Tools|Macro|Security...
>>> click "Medium" then Save and Close workbook and Re-Open and click
>>> "Enable Macros" on the dialog that appears.
>>>
>>> Ken Johnson
>>>
>>
>>
>
>