• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Alphabetical columns

Ok I'm stumped.

I have tried several ways to figure this out but with my limited knowledge it’s hard to know if the function I’m using is the best one or even the right one for the job.

I have a column of almost 600 names that changes monthly. I need to take that column & make it readable left to right while separating the different names by letter. WANTED worksheet in the attached workbook shows the end result that I have been doing manually.

I have successfully made the column A read left to right 5 names across then starts over on next line. The problem is when it goes from one letter to the next. If the number of names for a certain letter is not divisible by 5 then I get overflow from the next letter instead of starting a new row.

So I thought if I had 1 column for each letter I could extract the information only from that column. That did the same thing as the across did. So I put in a subtotal to insert a row between the letters. While it’s easier to see where the letters change its still not quite right.

But the subtotal did help when reading left to right as it will show a 0 on the letter change but nothing more. I made several helper columns to try to get x amount of zeros at the end of each row to make it to the next number divisible by 5. For example if there are 27 C names I need to add three 0's for 30 to push the next letter on the next row. Plus add 5 more 0's to give me a blank row when I easily hide the trailing 0's with a conditional. All the formula combos I try don’t seem to do what I need it to.

I have attached a file with 4 worksheets.

MASTER worksheet is main list of names & basic formula for the left to right without the 0's added in. The names just run together.

ABCDE worksheet is the columns of names in abc order. It also has the subtotal line & the names of the helper columns. Anything on this sheet will change the data on the worksheet named final.

WANTED worksheet is what I’m looking to do.

I know how many rows each group of names will take. I know how many zeros I need. I just don’t know how to put it all together. I want to be able to go to FINAL!E2 & put in the 1st letter & have the 5 columns to the right put in the right names because the 1st letter matches. In addition so many rows down from that 1st letter would show the next letter in sequence which would trigger those names to show left to right & so on.

i.e.: 1st letter is "_" & there are 24 names that start with _. That will always be in column E1 on the FINAL worksheet. I want the correct names for that letter to show to the right by 5 columns. When it hits the 25th name there’s a 0 to end the row & 5 more 0's for next row. On the next row at E7 there would be an "A" which happens to be 6 rows down from the previous letter (ABCDE!E2). I have a helper that counts the rows needed but I don’t know how to apply it correctly. Believe me, i've tried.

This would continue until letter Z. Each month as the list changes so would the placement of all the letters depending on the numbers in the helper columns. The "_" letter will always be in E1.

I hope someone can help me solve this & I thank you in advance.

Have a great day!
FreakyGirl
 

Attachments

Somendra, thank you.

now thats a formula! lol

i can understand some of what you did but some of it i will have to break down further but thats how i learn. but can you explain what =_xlfn is? i have never seen that before.

however, if i make any change to the master list of names the WANTED sheet no longer works. even if i add the name back in, it wont go back to the original.

this list will change monthly & most likely copy/pasted in. how can i keep the formula working when the names change?

thanks for your help
FreakyGirl
 
Narayank, thanks for providing an alternate way of doing it.

for some reason i cant seem to get the macro on my toolbar. i try to add it in but it wont let me modify the selection. it just remains grayed out so i just used 'run' to make it work.

its automatically which is awesome - ty for that - but there are 2 problems.

1 - there is no blank row between the letters
2 - if i make any modification to the master list i freeze up, or rather the macro wont work - it just sits there & i have to go to task manager to get out of excel totally.

thanks,
FreakyGirl
 
Somendra, thank you.

now thats a formula! lol

i can understand some of what you did but some of it i will have to break down further but thats how i learn. but can you explain what =_xlfn is? i have never seen that before.

however, if i make any change to the master list of names the WANTED sheet no longer works. even if i add the name back in, it wont go back to the original.

this list will change monthly & most likely copy/pasted in. how can i keep the formula working when the names change?

thanks for your help
FreakyGirl

Well I am not aware about what =_xlfn is? Because I created the formula in Excel 2010 and I believe that you are opening the file in 2013, I think functions in 2013 are made like that.

=_xlfn is displayed where you have formula which are not supported in excel version you are working with. May be it's because of me using IFERROR. See this link
https://support.office.com/en-sg/ar...-formula-882f1ef7-68fb-4fcd-8d54-9fbb77fd5025

Well I had change the names on MASTER sheet column A and it got reflected in the wanted sheet. I did not understand why it is not working at your end as it is working on my end.

See this file.

Regards,
 

Attachments

Last edited:
Narayank, once i changed the range it worked correctly.

thank you very much for your help & providing an automatic version of what i needed.

-----------

Somendra, yes. im using an old old version of excel. i dont normally use any of those other functions listed on the link you provided. for my errors i use ISERR with no problems.

once you changed the formula i was able to paste in a new list & see the results immed.

thank you also for your help!
FreakyGirl
 
Back
Top