Find last column with Data and copy

jl2509

Board Regular
Joined
Oct 30, 2015
Messages
198
Office Version
  1. 365
Platform
  1. Windows
Hello

I have a data collection form for Financial Audits which is created on a work sheet, rather than have many tabs for the audits, I have decided to Horizontally stack the audits within 1 worksheet. They are for the same company so this is a reasonable method for me.

However, I am trying to add a new audit sheet (Copy of last Audit) automatically via a button with a macro assigned

Any ideas how I can check for the last column with data in it, copy 8 columns backwards including the last column and paste the data, 1 column after the last data column?

ie Last data column is Column P, copy back from Column P to Column I and paste to Column Q

When I do this manually, I select Columns P to Column I, copy the selected columns, select Column Q, and paste

The column references obviously change as more audits are completed.

Appreciate any ideas

Thank you
 
How about
Code:
Sub CopyInsertCols()

    Range("B1").Resize(, 8).EntireColumn.Copy
    Range("B1").EntireColumn.Insert

End Sub
 
Upvote 0

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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