# Vertical List to Sort Horizontally on another sheet

1. ## Vertical List to Sort Horizontally on another sheet

I have an excel formula that I have that will automatically sort alphabetically by department then by name. But am lost on how to take the vertical list I have and have it sort horizontally. Attached is a sample sheet that in Columns I & J have my formula to sort it vertically, but how do I take that and make it sort horizontally in Rows 1 & 2 (highlighted yellow).

2. ## Re: Vertical List to Sort Horizontally on another sheet

Hmm hopefully someone can help me. I have tried searching google, but everything I see is just using transpose which I want to be able to automate this and not have to redo it every time.

3. ## Re: Vertical List to Sort Horizontally on another sheet

You don't have a yellow highlighted area
However, in L1 you could put

=IF(COUNTA(\$I\$2:\$I\$23)>=COLUMNS(\$A\$1:A1),INDEX(\$I\$2:\$I\$23, COLUMNS(\$A\$1:A1)),"")
copied to the right
In L2
=IF(COUNTA(\$J\$2:\$J\$23)>=COLUMNS(\$A\$1:A1),INDEX(\$J\$2:\$J\$23, COLUMNS(\$A\$1:A1)),"")
copied to the right.
Does that work for you?

4. ## Re: Vertical List to Sort Horizontally on another sheet

Im sorry I thought I changed it and saved it after highlighting the cells, but the cells that were supposed to be highlighted were B1:E2 and had the names in order by department. But what you have seems to work good! Thank you very much!

5. ## Re: Vertical List to Sort Horizontally on another sheet

Actually, It lists them right, but what about sorting them? I am going to mess with it myself and see if I can get it to work, but in the mean time if you have a quick fix that would be great. Sort by department then by name.

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1