View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
James Ravenswood James Ravenswood is offline
external usenet poster
 
Posts: 143
Default copy cell by command button

On Dec 28, 11:31*am, kalpesh
wrote:
Hello,

*my probelm is copy cell in other sheet

*sheet 1

*C5 cell value is * 1051

*when i click command button this cell value is copy & paste in sheet 2 *in
*Three Cell like * A1 *, A2 , A3

*& now, *agin i enter new *value 2510 *in C5 cell in sheet 1 is copy &
*paste in sheet 2 exact below earlyer paste cell like A4, *A5, * A6

*how it is possible


Assign this macro to the command button:

Sub Triplets()
If IsEmpty(Sheets("Sheet2").Range("A1")) Then
n = 1
Else
n = Sheets("Sheet2").Cells(Rows.Count, "A").End(xlUp).Row + 1
End If
Sheets("Sheet1").Range("C5").Copy Sheets("Sheet2").Cells(n,
1).Resize(3, 1)
End Sub