I am exporting the data through Array(Vlookup
from different sheet by matching Id's but whenever i sort the data A to Z by using any column. ID's array formula keeps the Id as it is. Due to which data cannot be sorted.
Your help will be much appreciated.
CodePudding user response:
try in A1:
={"IDs"; QUERY('Data Sheet'!A2:B, "select A where A <> 0 and A is not null order by B asc")}
and B2:
=ARRAYFORMULA(IF(A2:A="",,IFERROR(VLOOKUP(A2:A, 'Data Sheet'!$A$2:$I, {2,3,4,5,6,7,8}, 0))))
...if you want to keep vlookup
asc
can be changed to desc