vba code to transfer text from one cell range to another

jammoca

Banned
Joined
Nov 6, 2002
Messages
1,100
If I have some text or numeric values in cells within the range B1:B30 and I want a copy of that transferred to A1:A30 how would I code for that to happen and where would I put that code ?

I don't want to have formulae in the A1:A30 range as it stuffs up something else I'm doing.

any ideas ?
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hello,

It may be a good opportunity to give the macro recorder a shot. Turn it on, then select the range, copy, then paste to where you would like. Stop the recorder.

Then attach the macro to a button.

See if that works and if you need more help post back.
 
Upvote 0
<font face=Courier New><SPAN style="color:#00007F">Sub</SPAN> Macro3()<br><SPAN style="color:#007F00">'</SPAN><br><SPAN style="color:#007F00">' Macro3 Macro</SPAN><br><SPAN style="color:#007F00">' From the Macro Recorder</SPAN><br><br><SPAN style="color:#007F00">'''Here are the instructions:</SPAN><br><SPAN style="color:#007F00">'Press Alt + F11 to open VBEditor, then Keystrokes ALT - I - M to _<br>'       insert module, paste in this code.  Close the Editor</SPAN><br><SPAN style="color:#007F00">'Insert a button and assign Macro3...Ready to use.  Hope that helps, repairman615</SPAN><br><br>    Range("A1:A30").Select<br>    Selection.Copy<br>    Range("B1:B30").Select<br>    ActiveSheet.Paste<br>    Application.CutCopyMode = <SPAN style="color:#00007F">False</SPAN><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>
 
Upvote 0

Forum statistics

Threads
1,224,589
Messages
6,179,744
Members
452,940
Latest member
rootytrip

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