# Data sorting to the correct rows

Hi All,

I want to be able to "sort" the data so that the data corresponds to the correct rows where I assign the tag for that specific row.

I have attached the spreadsheet to illustrate this.  The downloaded data goes into the input tab.  The Output tab is where i want the data to go into.  So essentially when ever data appears in the input tab and/or adjusts I would like the same data to appear in the output tab but in the proper row.  The sheet should make it clear.

Any help would be great.

thanks!
SortData.xlsx
Microsoft Excel

Last Comment
andrew_man

8/22/2022 - Mon
andrew_man

Saqib Husain

Enter this formula in A10 and copy down and across

=IF(AND(A\$9<>"",\$K10<>""),INDEX(Input!\$A\$10:\$I\$1106,MATCH(Output!\$K10,Input!\$A\$10:\$A\$1106,0),MATCH(Output!A\$9,Input!\$A\$9:\$I\$9,0)),"")
BostonBob

Thanks ssaqibh....almost there.

In the input section of the sheet the data is downloaded but then sometimes the data becomes old and is deleted....automatically.  I guess this would be part of the "adjust" portion of my question.  Adjust could mean more, less or none....

When I try this on your sheet I get an N/A answer in the cell when the input data is deleted away.  Any quick fix on this?

Otherwise, super top marks for an elegant solution.  I would have NEVER thought of doing it THAT way.

Thanks!
andrew_man

=IFERROR(IF(AND(A\$9<>"",\$K10<>""),INDEX(Input!\$A\$10:\$I\$1106,MATCH(Output!\$K10,Input!\$A\$10:\$A\$1106,0),MATCH(Output!A\$9,Input!\$A\$9:\$I\$9,0)),""),"")
BostonBob

SWEET.  I wish I could give you 500,000 points!  You saved me about 20 hours of groping in the darkness.   So very, very awesome!!!!
Saqib Husain

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
BostonBob