Francis P. Posted September 30, 2009 Share Posted September 30, 2009 How could I replace the first word in a string? Thanks. Link to comment Share on other sites More sharing options...
Lee Smith Posted September 30, 2009 Share Posted September 30, 2009 What is the reason you need to do this? How about a hint to what the data looks like. I could give you a couple of calculations that would do this, but if we knew what you were trying to accomplish and why, we can better fit the answer. Lee Link to comment Share on other sites More sharing options...
Francis P. Posted September 30, 2009 Author Share Posted September 30, 2009 Well basically I have a price list with codes. I have an excel file with these codes but it has 1,2,3,4,5... before the code in other words code "x" would be "1 x" on the excel sheet. I need a function to replace the "1" before the x when importing. Thanks. Link to comment Share on other sites More sharing options...
Lee Smith Posted October 1, 2009 Share Posted October 1, 2009 Try RightWord (YourField; 1) Link to comment Share on other sites More sharing options...
Newbies bvo12585 Posted December 18, 2009 Newbies Share Posted December 18, 2009 I would use something like this since there may be more than just two words in the string. This would result in "xyz product" for an input of "123 xyz product". Input would obviously be the value you're importing. Let ( [ Input = "123 xyz product" ; ReplaceSpaces = Substitute ( Input ; " " ; "¶" ) ; FirstValue = GetValue ( ReplaceSpaces ; 1 ) ; Output = Substitute ( Input ; FirstValue ; "" ) ] ; Trim ( Output ) ) Link to comment Share on other sites More sharing options...
comment Posted December 18, 2009 Share Posted December 18, 2009 And this would result in "nails, 2 inch" for input of "1 nails, 12 inch". Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 5266 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now