Copy diff cells in next worksheet

gssachin

Board Regular
Joined
Nov 14, 2013
Messages
155
HI,

I want to copy diff cells (i.e. B2, D99 & E99) to another sheet in Column A2, B2 & C2 and every time it will get updated below (not overwrite) i.e. a3, b3, c3 etc

I write following code but need to short one

Sub Macro1()


Dim wss As Worksheet, wsf As Worksheet
Set wss = Sheets("VAC_EML (3)")
Set wsf = Sheets("DETAILS")


Application.ScreenUpdating = False
Application.Goto Reference:="R2C3"
Worksheets("VAC_EML (3)").Range("B2").Copy
Sheets("DETAILS").Select
Range("a" & Rows.Count).End(xlUp).Offset(1).Rows.Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False


Worksheets("VAC_EML (3)").Range("D99").Copy
Sheets("DETAILS").Select
Range("B" & Rows.Count).End(xlUp).Offset(1).Rows.Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False


Worksheets("VAC_EML (3)").Range("E99").Copy
Sheets("DETAILS").Select
Range("C" & Rows.Count).End(xlUp).Offset(1).Rows.Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False




End Sub

Please help for this...
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
How about
Code:
Sub gssachin()
   With Sheets("DETAILS").Range("A" & Rows.Count).End(xlUp).Offset(1)
      .Value = Sheets("VAC_EML (3)").Range("B2").Value
      .Offset(, 1).Resize(, 2).Value = Sheets("VAC_EML (3)").Range("D99:E99").Value
   End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,244
Members
452,622
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top