Extracting Data between XML tags

Bkav

New Member
Joined
Mar 6, 2020
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
Hi,

I am currently seeking a solution to extract certain information from XML between tags, name, address, gender etc. Basically I need to be able to make information presentable in a table form. I have used the below formula which works to extract the problem is if i create a template to extract from a certain cell the layout of each different XML changes slightly.

=SUBSTITUTE(SUBSTITUTE(TRIM(CLEAN(A1));"<Name>";"");"</Name>";"")

The above works however I'm not always guaranteed that the information is in cell A1

Is there an excel function to pull a cell containing a specific text? Example search column A for a cell that contains <Name> and present all the data in this cell.Or VBA code that could do this?Any and all input would be greatly appreciated!Thank you
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
maybe use Power Query (Get&Transform)
Data - New Query - From File - From XML
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,270
Members
452,628
Latest member
dd2

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