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

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
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,213,531
Messages
6,114,172
Members
448,554
Latest member
Gleisner2

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