Sort Named Ranges

User avatar
BobH
UraniumLounger
Posts: 9300
Joined: 13 Feb 2010, 01:27
Location: Deep in the Heart of Texas

Sort Named Ranges

Post by BobH »

It has been a donkey's age since I used Excel for anything more than a simple spreadsheet. I now find I have the need to organize groups of data, one for each of the US states and a 51st for territories and protectorates. I have the data in a spreadsheet and I have named ranges for the data in each state plus a blank row below the data to be used for totals, etc.

Is there a way that I can tell the sort function to sort the named range? For example, can I issue a Sort(Texas)options command? If so, how?

I'm certain this can be done using VBA, but I don't know VBA.

:cheers: :chocciebar: :thankyou:
Bob's yer Uncle
(1/2)(1+√5)
Dell Intel Core i5 Laptop, 3570K,1.60 GHz, 8 GB RAM, Windows 11 64-bit, LibreOffice,and other bits and bobs

User avatar
HansV
Administrator
Posts: 78608
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Sort Named Ranges

Post by HansV »

There is no way to do this in the Excel interface; you'll have to select each range and sort it.
If you would like a macro, we'd have to know what the sheet looks like and on which column(s) you want to sort.
Best wishes,
Hans

User avatar
BobH
UraniumLounger
Posts: 9300
Joined: 13 Feb 2010, 01:27
Location: Deep in the Heart of Texas

Re: Sort Named Ranges

Post by BobH »

Thanks, Hans! It is a large an complex sheet. I'll see if I can cobble together a macro. I now at least know that what I was trying to do is not possible.
Bob's yer Uncle
(1/2)(1+√5)
Dell Intel Core i5 Laptop, 3570K,1.60 GHz, 8 GB RAM, Windows 11 64-bit, LibreOffice,and other bits and bobs

LisaGreen
5StarLounger
Posts: 964
Joined: 08 Nov 2012, 17:54

Re: Sort Named Ranges

Post by LisaGreen »

Two penneths worth....

It maaaaaay be useful for you to change the ranges into tables.

Lisa