How to paste columns in first blank column to the right

pearl

New Member
Joined
Nov 3, 2010
Messages
14
I'm copying 3 columns and pasting them to the right of the previous columns. I would like to copy these columns to the end of the last column with data.

The goal is so that when and ECM qty button is hit the new ECM's will go to the end of the column instead of shifting everything over.

How do I do that?

Thanks so much,
Pearl


<font face=Courier New>********x = InputBox("Enter ecm Qty")<br><br>********<SPAN style="color:#00007F">For</SPAN> y = 1 <SPAN style="color:#00007F">To</SPAN> x<br><br>************ActiveSheet.Range("c12:e43").Select<br>************Application.CutCopyMode = <SPAN style="color:#00007F">False</SPAN><br>************Selection.Copy<br>************Selection.Insert Shift:=xlToRight<br>************ActiveCell.Offset(0, 3).Select<br><br>****************Range("F12:H12").Select<br>****************ActiveCell = "ECM Name"<br><br>****************Range("f31:h42").Select<br>****************ActiveCell.Offset(0, 3).Select<br>****************[f31:h42].FormulaR1C1 = "=+R[-17]C[-3]- r[-17]c"<br>************** <br>********<SPAN style="color:#00007F">Next</SPAN></FONT>
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
This will insert an entire column directly to the right of the last used column on your sheet:

Code:
ActiveSheet.UsedRange.Columns(ActiveSheet.UsedRange.Columns.Count + 1).EntireColumn.Insert

If you've copied something to the clipboard it will show up there.

Let me know if it works for you:)
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,299
Members
452,904
Latest member
CodeMasterX

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