Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-02-2020, 10:11 AM
14spar15 14spar15 is offline Extract the last number of the string under certain conditions Windows 7 64bit Extract the last number of the string under certain conditions Office 2010 64bit
Advanced Beginner
Extract the last number of the string under certain conditions
 
Join Date: Mar 2011
Posts: 97
14spar15 is on a distinguished road
Default Extract the last number of the string under certain conditions

Hello, I need a formula to extract the last number (will always be a single number) from a string only if that number is preceded by a single letter or two letters and then another number (this second number mentioned will be a group of numbers. All of this is preceded by a group of letters. Example – ABC1234D5 would become ABC1234D, ABC123EF4 would become ABC123EF, ABC12345D would remain ABC12345D and ABC1234 would remain ABC1234. If the process needs to be spread out over a couple columns that’s fine. The original string always starts with one or more letters followed by a group of numbers (2-5 digits). Extracting the last number in the string that is not preceded by another number might also be an option here. The finished results needs to be letters-numbers-letters -or- letters-numbers and never letters-numbers-letters-number. Any help would be appreciated.
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract the last number of the string under certain conditions Extract all characters from the nth number of a string Marcia Excel 2 02-24-2020 05:15 PM
Extract States from a String soldat452002 Excel 9 04-26-2018 04:16 AM
Extract the last number of the string under certain conditions Extract a string from a paragraph kirkm Word VBA 7 09-11-2016 06:13 PM
How to extract only numbers from a STRING? Learner7 Excel 3 07-02-2013 06:25 AM
Extract from String using Wildcard whousedmy Word 0 05-21-2009 01:35 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:03 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft