SlideShare a Scribd company logo
1 of 3
Download to read offline
E-TIPS
Finance, Valuation, Risk & Modelling
your one-partner solution for building skills and knowledge
Change Your Life with Excel
Getting Clever with Words
elcome to Change Your Life with Excel, bringing
you another couple of doses of Excel trickery to
help you save time and finish work earlier.
In this edition we look at some techniques to split (or
parse) cell values into 2 or more separate cells. This can
be useful if for example you have each full staff name in
a single cell but need to split them into first and last
names. One of these techniques will introduce you to a
couple of text functions which can be combined to do
some very clever parsing.
As always, the features covered here are based on Excel
2003 however most can still be found in other versions.
Tip
Using Text to Columns
Some of you may unwittingly be familiar with the Text to
Columns feature if you’ve ever opened a text file in Excel.
A series of Text Import dialog boxes appears which is
identical to the Text to Columns dialog boxes.
To illustrate how Text to Columns works let’s assume
that we have a column of dates which need separating
into day, month and year.
• Select the column containing the dates
• From the Menu Bar select Data | Text to
Columns
A Text to Columns dialog box appears which first asks
whether our data is Delimited or Fixed Width.
Delimited means that there is a common character or
symbol which separates the items we want to split.
Fixed Width means that we could draw a vertical line
down the column to separate the items we want to split.
• Select Delimited since the items we want to split
are not perfectly vertically aligned
• Click Next
Determine what character or symbol splits each item to
be separated (this could be a space or a tab for
example).
Here we can see that a “/” splits the days, months and
years. Since this is not a predefined option we need to
tell Excel that this is our Delimiter.
• Tick Other and enter a “/” in the adjacent box
Notice in the Data preview pane how the days, months
and years are now neatly split
• Click Next
By default Excel will overwrite the original column of
complete dates. If we want to preserve this column we
may want to split the days, months and years into
columns B, C and D. To do this:
• Enter cell reference B1 into the Destination field
• Click Finish
We now have our dates split into separate cells as
required. Note how the “/” character has disappeared
since this was used as the Delimiter.
W
By Leigh Drake
Director
Arc Business Processes
www.arcbusiness.com.au
E-TIPS
Finance, Valuation, Risk & Modelling
your one-partner solution for building skills and knowledge
Note that you may need to reformat the numbers in
column A.
We can also use this feature to easily split text. For
example the names below can be split into first and last
names by ticking the Space option as a Delimiter in the
2
nd
step of the Text to Columns feature.
Trick
Extract Words from a String of Text
Suppose we have a list of names or other text and we
want to separate out, say, every first and last word. Doing
this manually on anything but a short list would be very
time consuming. Instead we can combine 2 functions,
SUBSTITUTE and LEN to do this in seconds.
The example we will use shows various product items
which comprise a product code, description and colour
which we want to split into 3 columns.
Since each description can comprise a different number
of words which we need to keep together, we can’t
simply use the Text to Columns feature above.
This is a 5-step process. Steps 1 to 4 will insert a unique
character immediately after the first word and
immediately before the last word. Step 5 will then use
Text to Columns to split the text using the unique
character as a Delimiter.
Step 1
• In cell B2 type the function
=SUBSTITUTE(A2,“ ”,“*”,1)
This function says:
- reference the text in cell A2, and
- replace each space (denoted by “ ”, a space
enclosed by 2 double quotes),
- with an asterisk (denoted by “*”), but
- only replace the first instance of a space
(denoted by the 1)
The asterisk is our unique character which will be our
Delimiter.
This converts the text
C45901 Copy Paper A3 Blue
to
C45901*Copy Paper A3 Blue
Step 2
Unfortunately there’s no easy way of telling Excel to now
find the last instance of a space so we have to apply a bit
of logic.
To help us do this we need to get rid of all remaining
spaces.
• In cell C2 type the function
= SUBSTITUTE(B2,“ ”,“”)
E-TIPS
Finance, Valuation, Risk & Modelling
your one-partner solution for building skills and knowledge
This says:
- reference the text in cell B2, and
- replace each space (denoted by “ ”, a space
enclosed by 2 double quotes),
- with nothing (denoted by “”, 2 double quotes)
By leaving the instance number blank, all remaining
spaces will be replaced.
This converts the text
C45901*Copy Paper A3 Blue
to
C45901*CopyPaperA3Blue
Step 3
• In cell D2 type the formula
=LEN(B2)-LEN(C2)
LEN counts the number of characters in a string of text
(including spaces). Therefore this formula subtracts the
number of characters in the text in cell C2 (22) from the
number of characters in the text in cell B2 (25). This tells
us the number of spaces remaining in the text in cell B2
(3)
Step 4
We can now insert an asterisk immediately before the
last word.
• In cell E2 type the function
=SUBSTITUTE(B2,“ ”,“*”,D2)
D2 in this case is 3 so this function replaces the 3
rd
instance of a space with an asterisk which results in the
text:
C45901*Copy Paper A3*Blue
• Copy the formulas in cells B2 to E2 to the end of
the list
• Highlight column E and select Edit | Copy
• With column E still highlighted select Edit |
Paste Special and select Values
• Click OK
This removes the formulas in column E
Step 5
• Highlight column E
• Use Text to Columns as above and use * as the
Delimiter
3 columns will be created containing the product code,
description and colour. Columns A to D can now be
deleted and we can add appropriate column titles. Phew!
Once you get the hang of this trick you’ll see how flexible
it can be and what could have taken hours now just takes
seconds. Don’t you just love Excel?
Until next time, happy Excelling.

More Related Content

Recently uploaded

How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxUmeshTimilsina1
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 

Recently uploaded (20)

How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 

Featured

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 

Featured (20)

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 

Excel Tip: Getting clever with words

  • 1. E-TIPS Finance, Valuation, Risk & Modelling your one-partner solution for building skills and knowledge Change Your Life with Excel Getting Clever with Words elcome to Change Your Life with Excel, bringing you another couple of doses of Excel trickery to help you save time and finish work earlier. In this edition we look at some techniques to split (or parse) cell values into 2 or more separate cells. This can be useful if for example you have each full staff name in a single cell but need to split them into first and last names. One of these techniques will introduce you to a couple of text functions which can be combined to do some very clever parsing. As always, the features covered here are based on Excel 2003 however most can still be found in other versions. Tip Using Text to Columns Some of you may unwittingly be familiar with the Text to Columns feature if you’ve ever opened a text file in Excel. A series of Text Import dialog boxes appears which is identical to the Text to Columns dialog boxes. To illustrate how Text to Columns works let’s assume that we have a column of dates which need separating into day, month and year. • Select the column containing the dates • From the Menu Bar select Data | Text to Columns A Text to Columns dialog box appears which first asks whether our data is Delimited or Fixed Width. Delimited means that there is a common character or symbol which separates the items we want to split. Fixed Width means that we could draw a vertical line down the column to separate the items we want to split. • Select Delimited since the items we want to split are not perfectly vertically aligned • Click Next Determine what character or symbol splits each item to be separated (this could be a space or a tab for example). Here we can see that a “/” splits the days, months and years. Since this is not a predefined option we need to tell Excel that this is our Delimiter. • Tick Other and enter a “/” in the adjacent box Notice in the Data preview pane how the days, months and years are now neatly split • Click Next By default Excel will overwrite the original column of complete dates. If we want to preserve this column we may want to split the days, months and years into columns B, C and D. To do this: • Enter cell reference B1 into the Destination field • Click Finish We now have our dates split into separate cells as required. Note how the “/” character has disappeared since this was used as the Delimiter. W By Leigh Drake Director Arc Business Processes www.arcbusiness.com.au
  • 2. E-TIPS Finance, Valuation, Risk & Modelling your one-partner solution for building skills and knowledge Note that you may need to reformat the numbers in column A. We can also use this feature to easily split text. For example the names below can be split into first and last names by ticking the Space option as a Delimiter in the 2 nd step of the Text to Columns feature. Trick Extract Words from a String of Text Suppose we have a list of names or other text and we want to separate out, say, every first and last word. Doing this manually on anything but a short list would be very time consuming. Instead we can combine 2 functions, SUBSTITUTE and LEN to do this in seconds. The example we will use shows various product items which comprise a product code, description and colour which we want to split into 3 columns. Since each description can comprise a different number of words which we need to keep together, we can’t simply use the Text to Columns feature above. This is a 5-step process. Steps 1 to 4 will insert a unique character immediately after the first word and immediately before the last word. Step 5 will then use Text to Columns to split the text using the unique character as a Delimiter. Step 1 • In cell B2 type the function =SUBSTITUTE(A2,“ ”,“*”,1) This function says: - reference the text in cell A2, and - replace each space (denoted by “ ”, a space enclosed by 2 double quotes), - with an asterisk (denoted by “*”), but - only replace the first instance of a space (denoted by the 1) The asterisk is our unique character which will be our Delimiter. This converts the text C45901 Copy Paper A3 Blue to C45901*Copy Paper A3 Blue Step 2 Unfortunately there’s no easy way of telling Excel to now find the last instance of a space so we have to apply a bit of logic. To help us do this we need to get rid of all remaining spaces. • In cell C2 type the function = SUBSTITUTE(B2,“ ”,“”)
  • 3. E-TIPS Finance, Valuation, Risk & Modelling your one-partner solution for building skills and knowledge This says: - reference the text in cell B2, and - replace each space (denoted by “ ”, a space enclosed by 2 double quotes), - with nothing (denoted by “”, 2 double quotes) By leaving the instance number blank, all remaining spaces will be replaced. This converts the text C45901*Copy Paper A3 Blue to C45901*CopyPaperA3Blue Step 3 • In cell D2 type the formula =LEN(B2)-LEN(C2) LEN counts the number of characters in a string of text (including spaces). Therefore this formula subtracts the number of characters in the text in cell C2 (22) from the number of characters in the text in cell B2 (25). This tells us the number of spaces remaining in the text in cell B2 (3) Step 4 We can now insert an asterisk immediately before the last word. • In cell E2 type the function =SUBSTITUTE(B2,“ ”,“*”,D2) D2 in this case is 3 so this function replaces the 3 rd instance of a space with an asterisk which results in the text: C45901*Copy Paper A3*Blue • Copy the formulas in cells B2 to E2 to the end of the list • Highlight column E and select Edit | Copy • With column E still highlighted select Edit | Paste Special and select Values • Click OK This removes the formulas in column E Step 5 • Highlight column E • Use Text to Columns as above and use * as the Delimiter 3 columns will be created containing the product code, description and colour. Columns A to D can now be deleted and we can add appropriate column titles. Phew! Once you get the hang of this trick you’ll see how flexible it can be and what could have taken hours now just takes seconds. Don’t you just love Excel? Until next time, happy Excelling.