Q:

Excel sort complex table by column

I am new in Excel and it seems that I have basic problem, but I can't find any solution on the internet.  
I have Excel table which have 4 columns: Person, Age, Addresses, Price as shown below
+==================================+
| Person | Age | Addresses | Price |
+==================================+
|   P1   | 30  | St.1 N1   | 1000  |
|----------------------------------|
|        |     | St.3 N1   | 4000  |
|        |     |-----------|-------|
|   P4   | 50  | St.3 N3   | 5000  |
|        |     |-----------|-------|
|        |     | St.3 N2   | 6000  |
|----------------------------------|
|        |     | St.3 N1   | 4000  |
|   P2   | 50  |-----------|-------|
|        |     | St.3 N3   | 5000  |
|----------------------------------|
|        |     | St.2 N1   | 2000  |
|   P3   | 50  |-----------|-------|
|        |     | St.2 N2   | 3000  |
|..................................|
+==================================+

Here every person have multiple addresses to live and price for them . What is difficult to me is that I do not know how to sort by column Person (text) or Age (integer number). For example if I want to sort by Age in ascending order the result should look like this.
+==================================+
| Person | Age | Addresses | Price |
+==================================+
|   P1   | 30  | St.1 N1   | 1000  |
|----------------------------------|
|        |     | St.2 N1   | 2000  |
|   P3   | 40  |-----------|-------|
|        |     | St.2 N2   | 3000  |
|----------------------------------|
|        |     | St.3 N1   | 4000  |
|        |     |-----------|-------|
|   P4   | 50  | St.3 N3   | 5000  |
|        |     |-----------|-------|
|        |     | St.3 N2   | 6000  |
|----------------------------------|
|        |     | St.3 N1   | 4000  |
|   P2   | 50  |-----------|-------|
|        |     | St.3 N3   | 5000  |
|..................................|
+==================================+

As you can see it doesn't matter how other columns are sorted. The only thing that I want is to move Addresses and Price with the sorted cells from Age column (or Person). For now Person and Age are merged cells. It is possible to be changed. Any ideas will be helpful. Also I am using Excel 2016.
P.S. I know how to sort when all columns have equal rows size. I know how to filter them too. I've also saw that there is advanced sort where you can sort by multiple columns with priority but it doesn't seem to solve my problem ( At least I does not see solution).
P.S. Also if it is possible I want a buttons, like the buttons which appear when I click on Data tab -> Sort & Filter -> Filter button then from to the headers  Person, Age, Addresses, Price there is button to sort and filter.

A:

Since you say it is possible to change your data, just put it in this format:
+==================================+
| Person | Age | Addresses | Price |
+==================================+
|   P1   | 30  | St.1 N1   | 1000  |
|----------------------------------|
|   P4   | 50  | St.3 N1   | 4000  |
|--------------|-----------|-------|
|   P4   | 50  | St.3 N3   | 5000  |
|----------------------------------|
|   P4   | 50  | St.3 N2   | 6000  |
|----------------------------------|
|   P2   | 50  | St.3 N1   | 4000  |
|----------------------------------|
|   P2   | 50  | St.3 N3   | 5000  |
|----------------------------------|
|   P3   | 50  | St.2 N1   | 2000  |
|----------------------------------|
|   P3   | 50  | St.2 N2   | 3000  |
|..................................|
+==================================+

You could do some basic reading on normalization. Your original table was considered unnormalized, and this refactored version is first normal form.
To sort by age, do an advanced sort to sort by age, then by person. This will keep the groupings together.
To get a table with buttons to sort and filter, select your data, then choose Insert > Table.

