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]
<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]