From: karim on
hi,

i want to create a macro which copy the cell of colume "C"(there is a
formula in column C) when there is any value in cell of colume "A" and paste
only value to Colume "c".

Macro is working in same way but i''m not able to move selection on
worksheet means i'm not able to select any other cell on worksheet.

Please help as i'm new to this.

Macro which i created:-
Public Sub Worksheet_SelectionChange(ByVal Target As Range)

If Cells(Application.ActiveCell.Row, 1) <> "" Then

Cells(Application.ActiveCell.Row, 3).Copy
Cells(Application.ActiveCell.Row, 3).PasteSpecial Paste:=xlPasteValues,
Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End If

End Sub
From: Luke M on
Assuming that you want to make column C a static value once you've completed
something in column A, your macro would be something like:


Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
If Cells(Target.Row, "A") <> "" Then
Application.EnableEvents = False
Cells(Target.Row, "C").Value = Cells(Target.Row, "C").Value
Application.EnableEvents = True
End If
End Sub
--
Best Regards,

Luke M
"karim" <karim(a)discussions.microsoft.com> wrote in message
news:46E7B373-1C89-41EA-BE96-C00D813B2524(a)microsoft.com...
> hi,
>
> i want to create a macro which copy the cell of colume "C"(there is a
> formula in column C) when there is any value in cell of colume "A" and
> paste
> only value to Colume "c".
>
> Macro is working in same way but i''m not able to move selection on
> worksheet means i'm not able to select any other cell on worksheet.
>
> Please help as i'm new to this.
>
> Macro which i created:-
> Public Sub Worksheet_SelectionChange(ByVal Target As Range)
>
> If Cells(Application.ActiveCell.Row, 1) <> "" Then
>
> Cells(Application.ActiveCell.Row, 3).Copy
> Cells(Application.ActiveCell.Row, 3).PasteSpecial Paste:=xlPasteValues,
> Operation:=xlNone, SkipBlanks _
> :=False, Transpose:=False
> Application.CutCopyMode = False
> End If
>
> End Sub


 | 
Pages: 1
Prev: Formula for competition pairing
Next: Vlookup?