Selecting All Cells Even If Non Contiguous

53fordtruck

New Member
Joined
Aug 6, 2023
Messages
6
Office Version
  1. 365
Platform
  1. Windows
I get a daily company .csv report that has 10 columns but varying numbers of rows (anywhere from 1200-1500). There are many rows and cells that are blank. I would like to select from cell A3 to the end, including the blank cells, and then alphabetize the data based on column A. I can not figure out how to get all the data selected in VBA. I've tried getting xltoRight and xlDown to work, but keep getting stopped at the first blank row or column. Can someone please point me in the right direction? Thanks.

Sample in image.

Jerry
 

Attachments

  • SampleFileXL.PNG
    SampleFileXL.PNG
    55.3 KB · Views: 13
I went through all 3 options and all three worked, as I indicated.

I am new to this site. I found this in the Bill Jelen and Tracy Syrstad book "MS Excel VBA adn Macros".

Thanks to everyone who posted code for me to learn with.

I hope to get from 1 1/2 hours per report to less than 15 minutes. This one issue had me stuck for weeks.

It's great learning something new as a 58 year old. An old dog can learn new tricks.

Jerry
 
Upvote 0

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
It's great learning something new as a 58 year old. An old dog can learn new tricks.
You are just a pup Jerry. ;)
Stick around, there is plenty to learn. I have quite a few years on you and I am still learning stuff in this forum regularly. 😎
 
Upvote 1

Forum statistics

Threads
1,215,191
Messages
6,123,553
Members
449,108
Latest member
rache47

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