Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Stripping Charachters Post Reply Post New Topic
Author Message
BoltzGirl
Groupie
Groupie
Avatar

Joined: 22 Jan 2013
Online Status: Offline
Posts: 89
Quote BoltzGirl Replybullet Topic: Stripping Charachters
    Posted: 20 Aug 2018 at 11:25am
I have a field that I want to do a formula on to strip the field to only giving me back 3 characters that are within the field.

It is not in the same place at all times.

Example:
00CH006&&&
20%CH004

I want to always return only the 3 values 'after' the H in this field so that my result looks like 006 on the first record and 004 on the second record.

I know I have seen this done before and cannot find it anywhere so your help is much appreciated.
Always appreciate the help!
IP IP Logged
Valert16
Groupie
Groupie
Avatar

Joined: 21 Mar 2016
Location: Spain
Online Status: Offline
Posts: 57
Quote Valert16 Replybullet Posted: 20 Aug 2018 at 10:27pm
Try this formula:

Mid({FieldName}, InStr({FieldName}, "H")+1, 3)

Replace "FieldName" by its real name.
IP IP Logged
BoltzGirl
Groupie
Groupie
Avatar

Joined: 22 Jan 2013
Online Status: Offline
Posts: 89
Quote BoltzGirl Replybullet Posted: 21 Aug 2018 at 4:15am
Worked perfectly!!! Thank you so very much!   
Always appreciate the help!
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
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



This page was generated in 0.031 seconds.