This is CRAZY!!!. I stumbled on a weird use for FILTERXML() while reading a forum post earlier today. So I couldn’t wait to test it. I am happy to share the results.
Say you have some text (sentence / phrase / keyword etc.) in a cell and you want to extract the nth word. Unfortunately Excel doesn’t have SPLIT() formula. So we end up writing obscenely long array formulas or use gazillion helper columns.
Here is the super sneaky trick. Use FILTERXML() instead.
See this example

How to extract words from sentence with FILTERXML
Say you have a long sentence (or keyword phrase) in cell C3.
Step 1: Convert this to valid XML
This sounds complicated that it is. All you need to do is prefix, insert and suffix some tags. Like this:
="<DATA><A>"& SUBSTITUTE(C3, " ", "</A><A>") & "</A></DATA>"
This will turn C3 in to a valid XML block with each word as <A> node.
Step 2: Use FILTERXML on this to extract words
Now that we have valid XML, you can say =FILTERXML(C5, “/DATA/A[3]”)
to extract the 3rd word from our XML converted sentence.
Step 3: There are no more steps. Enjoy FILTERXML.
Bonus trick: Use [last()] to get the last word. For example, =FILTERXML(C5, “/DATA/A[last()]”) will get you the last word from sentence.
Watch this – how to extract words with FILTERXML() in Excel
I was so excited to learn about this that I recorded a video in my robe. Rated A (for awesomeness), Do check it out below or on my YouTube page.
Download example workbook
Click here to download the example file for this tip. Play with FILTERXML to learn more.
Learn more about XML & XPATH
If you want to learn how XML and Xpath work, check out these pages.
- Xpath cheatsheet – devhints
- Xpath examples – w3 Schools
What if you can’t use FILTERXML?
FILTERXML works in Excel 2013 or above. But if you are using an older version of Excel or Excel for Mac, then you can’t rely on this method. Check out below two examples to learn other ways to split and extract words from sentences.
Do you FILTERXML for splitting or something else …?
I almost never use FILTERXML unless I am calculating distance between points or calling a webservice. But this use of splitting text is fun. Big thanks to GraH for posting this in the forum.
What about you? Have you used FILTERXML for any other out of box situations? Please share in the comments. Pretty please with sprinkles of conditional formatting icons on top 🙂













11 Responses to “FREE Calendar & Planner Excel Template for 2025”
Hi,
I downloaded this 2025 Calendar template. I checked the custom tab. Is it possible to change the weekend Fri & Sat.
Thanks
It is. Just use the option for fri & sat weekend (should be 7).
Activities of some dates are not getting displayed on "Any month" and "printable calendar" sheets.
e.g. Activity of 24 Apr 25.
Can you check again? The date in "planner" sheet should be a proper date. When I tested with 24-apr-2025, it works.
Love this calendar... I have highlight planner dates enabled but all dates are blue, is it possible to customize the color based on the type assigned to each date?
What would be the right way to add more Holidays in the Customizations?
Inserting rows in the Holiday List causes the blank cells in the calendar to turn Blue.
This is amazing!!! The best I've seen so far!! Is it possible to update it to consider a column for the final date? That way, if an event lasts more than one day, it repeats in the calendar
How do we change/insert the customization "Icon Options" ?
You can adjust these from the settings tab.
Is there anyway this can turn into an academic calendar (ie. start month is July and runs all the way through June of next year)?
Is there a way to make it something that is more than a day without having to add it to every day of that week.