sorting data

marcus.brown

Board Regular
Joined
Jun 23, 2008
Messages
61
hi,

I have a stream of data and I need to sort the rows in alphabetical order (A-Z), with the sortfield being in column A. However, i don't know the size of the data (it will vary day to day).

How can i go about sorting the rows, when I don't know the size of my data? All i know is that the data will begin from row 3 and there won't be any blank rows, until the last data. After a gap, there may be some other data, which needs to remain as is.

I'm not sure if i've been very clear - apologies if not.

Thanks,
Aftab
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
:huh: Unless I'm missing something, just click the sort button? Excel will pick up the data block if it as you describe - no blank rows (or columns if the data block is multi-columnar); and the non-sortable data is below a blank row. Note that if your data contains naught but text (no numbers or dates) then you might need to use the Sort dialog to tell Excel that your data has headers (assuming it does, indeed have headers).
 
Upvote 0
sorry, i don't think i was very clear - i need it in vba, and just clicking on sort, picks up rows below the data, which i don't want it to pick up.

i want it to sort the data from row 3 until the first non-empty cell in column A.
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,310
Members
452,906
Latest member
phanmemchatdakenhupviral

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