Sorting in Excel with Group Headers if the Exist

I have a table in Excel that contains some directory information - Name, Department, Extension, etc.

On another worksheet  within the same workbook, I want to created a filtered view of the directory. I only want to display a few of the fields, and I want them to be sorted by the person's last name. That part I can handle.

Here's the trick, I want a header row for each letter of the alphabet (but only if last names exist beginning with that letter), followed by the alphabetical list of names that begin with that letter.

So, instead of:

Appleby
Antler
Bates
Bogus
Dreyfus
Goony

I would get:

A
Appleby
Antler

B
Bates
Bogus

D
Dreyfus

G
Goony

(Nothing that "C", "E", "F" do not appear since there are no last names beginning with those records.)

I'm not sure if this is even possible, but I'm hoping it is!

Thanks!!
GMC02108Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Rob HensonConnect With a Mentor Finance AnalystCommented:
You could get something similar with a Pivot Table.

See attached.
Directory.xlsx
0
 
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
It would help all of us if you can upload a sample workbook and mock up the desired output manually to show all the steps you want to automate to get the desired output.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.