Copy cells to another sheet on next empty row

Znicker

New Member
Joined
Dec 3, 2018
Messages
7
Hi,
Tried to look this up but i couldt make the other threads relevant.

I need to copy content (E17) from a sheet named "Dashboard" to a sheet with the name same as value in cell c17 in "Dashboard"

Then i want to paste it in the next empty cell under cell C26

How do i code this in vba?

Thanks
Magne
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
If C26 isn't the last row of data,try this...

Code:
Sub x()

Dim Dest_sht As String
With Sheets("Dashboard")
    Dest_sht = .Range("C17").Value
    .Range("E17").Copy Sheets(Dest_sht).Range("C26").End(xlDown).Offset(1)
End With
End Sub


If C26 is the last row try this..
Code:
Sub x()
Dim Dest_sht As String
With Sheets("Dashboard")
    Dest_sht = .Range("C17").Value
    .Range("E17").Copy Sheets(Dest_sht).Cells(Rows.Count, 3).End(xlUp).Offset(1)
End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,386
Messages
6,119,215
Members
448,874
Latest member
b1step2far

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