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!
 

Some videos you may like

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
13,886
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
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:

Watch MrExcel Video

Forum statistics

Threads
1,123,385
Messages
5,601,329
Members
414,445
Latest member
walramgo02

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
Top