Delete Columns to the right and Rows below my data set

dougebowl

Board Regular
Joined
Feb 22, 2010
Messages
60
I have a data set that has column headings and my data will ALWAYS contain a value in column A. I would like a solution to perform 2 tasks.

  • Delete all columns to to the right of my data set (the first column without a column heading and all columns to the right end.
    • The number columns is dynamic, so, I need the solution to be able to determine the last first column without a column heading
  • Delete all rows below the last row containing a value in column A.
    • The number of rows is dynamic, so, I need the solution to be able to determine the first row that does not contain a value in column A
Thanks in advance for the assistance.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
You need a formula or macro that will find last column and last row. Lots of VBA code to do that here and elsewhere. I assume there is likewise formula help to do it also. Search for "find last row of worksheet" or "find last column of worksheet".
 
Upvote 0

Forum statistics

Threads
1,214,873
Messages
6,122,029
Members
449,061
Latest member
TheRealJoaquin

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