Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 08-04-2013, 08:40 PM
BobBridges's Avatar
BobBridges BobBridges is offline display error Windows 7 64bit display error Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

Jolinchew, are you saying you want—well, let me rephrase it and you tell me whether it's right:

Quote:
I have a string that is at least four characters long. Somewhere in that string is the substring "2013". Wherever that exists, I want the string to be truncated just before that. For instance:

"1234567892103": Display "123456789"
"abc7892013zyx321": Display "abc789" (dropping "2013" and everything that comes after it)
"Happy New Year!": Display "Happy New Year!" (no change)
"20136458cabd": Display "" (no string)
"4.52013672013892013": Display "4.5" (it's the first "2013" that matters)
"(212) 456-2013": Display "(212) 456-"
"2014 - 2013 = 1": Display "2014 - " (with trailing space)
If all that's right, it seems to me you need to use the FIND function to find "2013". Once you know what position it's in, you can use the LEFT function to keep just the parts of the character string that come before that position. Does that tell you what you need to know, or do you need a little coaching to use those two functions?

Last edited by BobBridges; 08-04-2013 at 08:41 PM. Reason: Fix a typo
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Milestones: Display of - turning off the display of the date Pmacdaddy Project 3 01-18-2013 05:42 PM
WORD 2010 Print Layout View display error cwk Word 1 06-20-2012 04:38 PM
display error Microsoft office 2010 error 2908 and error 1935 !!!!!!heeeeellpppp!!!!!!!!! bennypryde Office 1 01-05-2012 03:33 PM
Microsoft Office 2010 programs display error message "Application has failed to start SamSR Office 1 02-15-2011 07:15 AM
Runtime error 5487 - Word cannot complete the save to to file permission error franferns Word 0 11-25-2009 05:35 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:07 PM.


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