1) As written, Cells(r,c) = Target (the cell just changed). You know that,
right? (Then why not just use Target?)
2)
> If Cells(r, c) = Empty Then
Column 26 should have RptCreator's value placed in it ONLY if you have just
*cleared* Target so that it is now Empty. It will not react to any other
change. Is that not what you are seeing?
HTH,
"ssGuru" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I want to add a value in col 26 in the current row IF a change occurs
> in Column 3 of that row.
> I have a cell with a named range "RptCreator", in the worksheet
> "InstructionPrice"
> Any ideas why this code DOES NOT add any value to Col 26? or anywhere
> else.
>
> Private Sub Worksheet_Change(ByVal Target As Range)
> Dim Pn As String
>
> If Target.Column = 3 Then
> r = Target.Row
> c = Target.Column
> Pn = Sheets("InstructionPrice").Range("RptCreator").Value
> If Cells(r, c) = Empty Then
> Cells(r, 26) = Pn
> End If
> End If
> End Sub
>
> Thanks, Dennis
>
|