Copy and Paste to another sheet on an empty cell

cantab429

New Member
Joined
Mar 24, 2019
Messages
8
hi guys, new to the forum.... im trying to code up in VBA but stuck at the moment hoping to find answers...

basically i have this worksheet tab call "Fruits", with a column header starting at cell A4 call "Fruit Types", and subsequently A5, A6 onwards have different names of fruits. Basically I want to create a command where I can simply press "ctrl+x" and it will automatically copy and paste the fruit name (say my cursor is on A5) to column B at another worksheet name "Order".

This would have been straight forward but I need to paste the Fruit name to the next empty cell; say cell B1 is "Fruit" (the header), B2 is Apple, B3 is Pears, then it will need to automatically paste the information to B4. I am struggling with how I can locate an empty cell and paste it onto that cell.

Much appreciated for any help! Thanks in advance!
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Sub CopyIt()
Selection.Copy Worksheets("Order").Range("B" & Rows.Count).End(xlUp)(2)
End Sub
Then go into Macro on the developer tab (or press Alt+F8), click on your macro name, click options and assign your shortcut there
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

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