I have a project where I need to group by first letter of last name. The groups can be dynamic and would range from letters in the alphabet (ie. A-E, F-J, K-P, Q,T,W-Z)
The start and end of each of these ranges is in a cell so I can read the cells and create the groups in variables if necessary. Since it is dynamic, I have row header "Folder Group 1, 2, 3, etc." so I can read each row that begins with "Folder Group*" and create a variable for this (should I use an array to store this?
I plan on converting the letters to numbers so I can easily calculate which range the first letter of the last name is in. I can create an alphabet array and then select the indexes, or I found to use Code(Upper(letter))-64 and that will get me the alphabet position
Does this seem like the best way to do it? I plan on creating public variables with the ranges so each last name I run through a function can reference the ranges. Just wondering if storing the ranges as arrays makes the most sense, since I need two variables per range
Also, since the number of groups is dynamic (could be 5, could be 10, could be 2), should I use one global array for definition?
The start and end of each of these ranges is in a cell so I can read the cells and create the groups in variables if necessary. Since it is dynamic, I have row header "Folder Group 1, 2, 3, etc." so I can read each row that begins with "Folder Group*" and create a variable for this (should I use an array to store this?
I plan on converting the letters to numbers so I can easily calculate which range the first letter of the last name is in. I can create an alphabet array and then select the indexes, or I found to use Code(Upper(letter))-64 and that will get me the alphabet position
Does this seem like the best way to do it? I plan on creating public variables with the ranges so each last name I run through a function can reference the ranges. Just wondering if storing the ranges as arrays makes the most sense, since I need two variables per range
Also, since the number of groups is dynamic (could be 5, could be 10, could be 2), should I use one global array for definition?