Computer Learning Zone CLZ Access Excel Word Windows

Those with the courage to explore the weave and structure of the Cosmos, even where it differs profoundly from their wishes and prejudices, will penetrate its deepest mysteries.

-Carl Sagan
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Excel Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Splitting data in one cell into multiple columns
Anna 

16 years ago
Let's say I have "costco purchase 321.10" in A1, "Gym membership 20.10" in A2, "Mcdonalds .99" in A3, "payment 2289.20" in A4, and other similar items from A5 to A99, how can I split this information into 2 columns with the description in one column and the amount in the next?  Since the number of characters for the description and amounts vary from cell to cell and some have more spaces than others, I don't think I can use Text To Column or split the cells by length or delimiter (these were the only methods I can think of).  Please help!  I don't want to have to do this manually!


Answer from Richard Rost:

Yes, I'm sure it could be done, but you're probably going to have to use some VB code to write a custom function.

I would make a loop that would start at the end of the string and count backwards until it hits the first SPACE character. That would indicate where the description ends and the price begins. Now you know where you can split the cell into two.

You could also use a variety of VBA functions (like InstrRev) to find that space character.

A quick Google search shows me that there are a couple of CRAZY methods to do the same thing using non-VBA means. I searched for "excel search backwards" and found a couple.

So the answer to your question is "YES, it's certainly possible." Walking you through it, step by step, however, would take me a while. I hope this gives you some direction, however. Good luck.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Excel Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/18/2026 12:41:57 PM. PLT: 0s