Topic: Formula - Help needed Posted: 16 Jul 2008 at 9:14pm
Hi Again
A new problem for me but I think this one should be a little easier to resolve (I hope)! I have a field which contains string such as 'IMPORT FREIGHT - <a product code here>. What I need is to just pull data in this field where the product code is > than A. So for example it needs to be "IMPORT FREIGHT - A bla bla". Then I need another query that just pulls anything except where the code starts with A? Because this field does not contain the product code at the start I am not sure how to do this. Any help would be very much appreciated.
Hi, thanks for your reply. Below is sample data from this field.
IMPORT FREIGHT - SHIP4. WHITE - WHITE Shipment Testing # 3 With Hang
SHIP4 is the product code. I want two filters. One which picks up product codes starting with 'A' only and the second which excludes codes starting with 'A'.
I want this whole field to appear which I can handle, it is just extracting the right codes as mentioned above.
Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Posted: 18 Jul 2008 at 11:14am
Hi...
Ok now you have to create 4 formulas
frm1
trim(mid("IMPORT FREIGHT - SHIP4. WHITE - WHITE Shipment Testing # 3 With Hang",instr("IMPORT FREIGHT - SHIP4. WHITE - WHITE Shipment Testing # 3 With Hang",'-')))
output
- SHIP4. WHITE - WHITE Shipment Testing # 3 With Hang
Thanks so much for this, but I still dont understand how this can work, as what i sent you was an example of the data, but the data and therefore code could in fact be IMPORT FREIGHT - AX100. BLACK - BLACK Black Item type" etc...or something else for that matter, the only thing which remains the same is IMPORT FREIGHT so if I could trim this of then I guess your theory would work as this is always a prefix. Does that make sense? Can you help me just trim that? Thanks again
Ignore my stupid reply, I have been able to adapt your wonderful formula to the field and therefore get what I need! I cannot thank you enough...THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum