XML table / conditional TEXTJOIN function

HJimHB

New Member
Joined
Dec 2, 2019
Messages
9
Office Version
  1. 365
Platform
  1. Windows
Hi

I have a system which exports XML files that I need to convert into Excel for reconciliation etc.

The XML table function in Excel works but puts each bit of data on the next line - for example:

Ref Surname Forename
1
Mouse
Mickey
2
Duck
Donald


The TEXTJOIN function allows me to put all the information for each reference on one line but it is very time-consuming to set the ranges (the full files run to dozens of columns and thousands of rows, and you have to scroll down to the next reference to find where to stop).

Is there a way to set the function to look at the first column and only go down as far as the next change in value?

There is not a fixed number of rows between each reference so it has to look to the next reference. In addition, the references are not sequential or in the same format (although they are all numbers).

Is anyone able to suggest an easy way to do this?

Thanks in advance
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
To clarify how the table looks as it didn't come through clearly:

REFSURNAMEFORENAME
1
Mouse
Mickey
2
Duck
Donald
 
Upvote 0

Forum statistics

Threads
1,214,936
Messages
6,122,340
Members
449,079
Latest member
rocketslinger

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top