Name Sorting

Disarmonious

Board Regular
Joined
Oct 31, 2016
Messages
144
[TABLE="width: 375"]
<tbody>[TR]
[TD="colspan: 5"]I would like to automatically sort names alphabetically (a-z) when a name is typed into a list of cells. There are cells with a header named "Name" (L3 & O3), cells with a header named "ID" (M3 & P3), and cells with a header name "Location" (N3:Q3). As I type the names into the name column (columns L & O), I need them to automatically sort by last name, but in addition, I need the neighboring cells to "follow" the name cells (up or down based on the last names the name cells). I haven't really used VBA yet, but I'd like to make this my first VBA project. I tried using a Macro to accomplish what I'm trying to do, but since there are multiple columns, Excel doesn't allow a button macro for what I need (if there is a way, a suggestion for a button macro would be nice too). For a better idea on what the columns/rows are, here's what I have; cell L3 and cell O3 are headers for the "Name" column; cell M3 and cell P3 are headers for the "ID" column; and cell N3 and cell Q3 are the headers for the "Location" column. Each column has 18 rows (L3:L21) / (M3:M21) / (N3:N21) / (O3:O21) / (P3:P21) / (Q3:Q21). I hope my question is clear enough, and I thank those up front for the help in getting this accomplished.[/TD]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Re: Name Sorting Help!

Make the macro trigger from worksheet_change, and put the data in a table so when you filter/sort one column it filter/sorts them all. I'm not a VBA wizard, but I beleive this would work. I will try to mock up some code and get back to you.
 
Upvote 0
Re: Name Sorting Help!

joes2007,

Thanks for the advice. If you can come up with atleast an example, that would be helpful!
 
Upvote 0
Re: Name Sorting Help!

@joes2007
I have removed the content of this post as it was against board policy. Please see Rule#4
Cheers

Hello, were you able to receive my email address? I'm still seeking assistance on how to create a formula/VBA code to be able to auto-sort names on my document, thanks for your assistance.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,173
Members
453,021
Latest member
Justyna P

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