#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default Macro Help

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 457
Default Macro Help

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" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 3 February 5th 07 08:22 PM
using a cell value to control a counter inside a macro and displaying macro value ocset Excel Worksheet Functions 1 September 10th 06 05:32 AM


All times are GMT +1. The time now is 01:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"