## How to sort dynamic data in Microsoft Excel?

Let's say you are managing the storage data of a stationary shop in Excel, and you need to automatically sort the storage data when it changes. How do you sort the dynamic storages data automatically in Excel? This article will show you a tricky way to sort dynamic data in Excel, and keep the sorting update automatically when the original data changes at once.

**You may interest in:**

Combine multiple worksheets/workbooks into one worksheet / workbook: |

Combine multiple worksheets or workbooks into one single worksheet or workbook may be a huge task in your daily work. But, if you have **Kutools for Excel**, its powerful utility – **Combine** can help you quickly combine multiple worksheets, workbooks into one worksheet or workbook.

**Recommended Productivity Tools**

**Office Tab**: **Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.**Try now

**Kutools for Excel**: **200 new features for Excel, make Excel much easy and powerful, increase productivity immediately.**Try now

#### **Sort synamic data in Excel with formula**

1. Insert a new column at the beginning of the original data. Here I insert column No. before the original data as below screenshot shown:

2. Follow our example, enter formula ** =RANK(C2,C$2:C$6)** in Cell A2 to sort original products by their storage, and press the

**Enter**key.

3. Keep selecting cell A2, drag the **Fill Handle** down to cell A6 to get all rest numbers in No. column.

4: Copy the titles of the original data, and then paste them besides original table, such as E1:G1. In the Desired No. column, insert the sequence numbers same as the No. orders such as 1, 2, …. See screenshot:

5. Enter formula ** =VLOOKUP(E2,A$2:C$6,2,FALSE)** into Cell F2, and press the

**Enter**key.

This formula will look for the value of Desired NO. in the original table, and display the corresponding product name in the cell.

**Note**: If repeats or ties display in the Product column or Storage column, you’d better apply this function **=IFERROR(VLOOKUP(E2,A$2:C$6,2,FALSE), VLOOKUP(E2,A$2:C$6,2,TRUE))**

6. Keep selecting cell F2, drag the Fill Handle down to cell F6 to get all product names, And keep selecting range F2:F6, drag the Fill Handle right to range G2:G6 to get all storage numbers.

Then you will get a new storage table sorting in descend order by the storage as below screenshot shown:

Supposing your stationary shop purchases another 145 pens, and now you have 200 pens in total. Just modify the original table of pen's storage, you will see the new table is updated in a blink of eyes, see the following screen shot:

**Recommended Productivity Tools**

**Office Tab**

** Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.**

**Kutools for Excel**

**Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!**

**200 New Features for Excel, Make Excel Much Easy and Powerful:**

- Merge Cell/Rows/Columns without Losing Data.
- Combine and Consolidate Multiple Sheets and Workbooks.
- Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
- Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
- More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

## Comments

I can do the same without Kutools and in your example iso changing the amount for pencils, you can add another line, repeat pencils and add the additional amount and my spreadsheet will display pencils only once (it does not matter how many pencil entries there are)with the total amount. Plain Excel without Macros, VB Code, Access, D Base, etc. I would love to show you.

Thanks for your comment. The =VLOOKUP(E2,A$2 :C$6,2,FALSE) will match the data exactly, so it goes wrong if ties happen.

In this case, you can try the approximate matching function

, which work well if ties come out. And hope it works for you.=IFERRO R(VLOOKUP(E2,A$ 2:C$6,2,FALSE), VLOOKUP(E2,A$2: C$6,2,TRUE))This is the raw data:Pos. Team P W L Pts

1 Team 1 1 1 0 4

6 Team 2 1 0 1 0

1 Team 3 1 1 0 4

6 Team 4 1 0 1 0

1 Team 5 1 1 0 4

6 Team 6 1 0 1 0

1 Team 7 1 1 0 4

6 Team 8 1 0 1 0

1 Team 9 1 1 0 4

6 Team 10 1 0 1 0

This is the vlookup table of the table above:Pos. Team P W L Pts

1 Team 1 1 1 0 4

2 #N/A #N/A #N/A #N/A #N/A

3 #N/A #N/A #N/A #N/A #N/A

4 #N/A #N/A #N/A #N/A #N/A

5 #N/A #N/A #N/A #N/A #N/A

6 Team 2 1 0 1 0

7 #N/A #N/A #N/A #N/A #N/A

8 #N/A #N/A #N/A #N/A #N/A

9 #N/A #N/A #N/A #N/A #N/A

10 #N/A #N/A #N/A #N/A #N/A

Please help! Thanks a million

=IFERROR(VLOOKUP(I3,CALCULATIONS!I$2:K$7,2,FALSE),(VLOOKUP(I3,CALCULATIONS!I$2:K$7,2,TRUE)))

Now I have a problem... If 2 or more people have the same points, excel repeats the name. What should I add in the formula to avoid repeated names when they have the same amount of points?

Thank you

Column A Column B Column C

1

2 10 25

3 4 60

4 9 95

5 2 30

6

7 6 20

8 5 31

9 3 45

10 1 55

in column B, there are two digits (7 &8) missing. i just want that column B be sorted against each digit in column A, like 1 in front of 1 and 2 in front 2 and missing should remain blank in column B in front of 7 & 8 in column A.

Column A Column B Column C

1 1 55

2 2 30

3 3 45

4 4 60

5 5 31

6 6 20

7

8

9 9 95

10 10 25

I hope i have complicated it a lot but plz somebody help me out.

I am trying to create a dart averages table, for multiple teams,so that each match when I enter data it automatically calculates on another page on the same sheet.

Rank Name Pl W L 100+ 140+ 180 Av D/Av

Kind Regards

Again,in an attempt to clarify...Manuf acture provided excel sheet contains a vendor number and a UPC number. second sheet has same vendor number and internal part number and I want a Kutool function that will compare vendor numbers and attach the UPC to the second sheet which will then be imported back into our system (using internal part number to "find" the item)

Any help will be appreciated!!

Original Formula for A2:

=RANK(C2,C$2:C$6)

Revised Formula for A2:

=RANK(C2,C$2:C$6)+(IF(C2=C1,1,0))

Then copy that formula down for all the cells in the A column.

=RANK would then Show the list 1,1,3,4,5 etc. So whenever you make a VLOOKUP search it would skip the skipped number, which is 2 in our example.

Here is the solution. =VLOOKUP(SMALL(range;n);range;column;FALSE).

SMALL formula goes finds the n th smallest value in the list. And it catches the repeated values also. Altough there is not actually a 2nd value in our sample, it goes finds the repeated 1st value.

Hope this helps.

Check this out for a better solution and Do as i write:

Step1: Enter serial no 1 to 10 in cells A1 to A10 (S.No.).

Step2: Enter any values in cells B1 to B10 (Item Qty.).

Step3: Enter any object names in cells C1 to C10 (Item Name).

Step4: Enter formula =RANK(B4,B$4:B$ 16)+COUNTIF(B$4 :B4,"="&B4)-1 in cell D1. Drag till D10. (Item position)

Step5: Enter formula =C4 in E1 and drag till E10. (Item Name as is)

Step6: Enter formula =LARGE($B$4:$B$ 16,A4) in F1 and drag till F10. (Desired Item qty. in order)

Step7: Enter formula =IFERROR(VLOOKU P(A4,D$4:E$16,2 ,FALSE), VLOOKUP(A4,D$4: E$16,2,TRUE)) in cell G1 and drag till G10. (Desired Item Name in order).

Watch carefully, Your Desired Item qty. and item name would be in Cell F1 to G10.

If still got problem, download the excel sheet, its protected and the password is password. change value in current cell and press Enter. Watch the last two columns.

And if Still in problem ? let me know.

please use below instead of just Rank...

=RANK(C2,C$2:C $6) + COUNTIF(C$2:C2,C2)-1

works every time. Thanks to OptimusPrime!

The correct one is as follows:

Step1: Enter serial no 1 to 10 in cells A1 to A10 (S.No.).

Step2: Enter any values in cells B1 to B10 (Item Qty.).

Step3: Enter any object names in cells C1 to C10 (Item Name).

Step4: Enter formula =RANK(B1,B$1:B$ 10)+COUNTIF(B$1 :B1,"="&B1)-1 in cell D1. Drag till D10. (Item position)

Step5: Enter formula =C1 in E1 and drag till E10. (Item Name as is)

Step6: Enter formula =LARGE($B$1:$B$ 10,A1) in F1 and drag till F10. (Desired Item qty. in order)

Step7: Enter formula =IFERROR(VLOOKU P(A1,D$1:E$10,2 ,FALSE), VLOOKUP(A1,D$1: E$10,2,TRUE)) in cell G1 and drag till G10. (Desired Item Name in order).

Watch carefully, Your Desired Item qty. and item name would be in Cell F1 to G10.

Jays

I have a sheet with 100 items , each item has a specific cost that happens in one year .I want to create another sheet that shows only the item that has cost in one year automatically ? for example all of the item with item No. and description and cost in 2016 and then for 2017 and so on...

thanks

Its easy, Got it ?

http://www.pcmag.com/article2/0,2817,1215343,00.asp