FILTERXML to return multiple rows and columns

New Contributor

hello Excel helpers,


I am trying to get FILTERXML return multiple rows and columns with one call. 


my xml example is :



my xpath is :

//x/a | //x/b


Excel now returns 1 column with 8 rows, whilst I would like to get 2 columns, each having 4 rows ( 1 column for the a field, and one column for the b field )


Is this possible. Note that I cannot create two distinct FILTERXML functions as I need to have the resulting dynamic array covering the complete dataset.


thnaks for your advise


2 Replies
best response confirmed by gdebouvertrinseocom (New Contributor)

@gdebouvertrinseocom  there might be a more elegant solution, but this will work:

does the job.

Thanks a lot - you saved my day - Excel is such as a great tool