Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parsing data 1

Status
Not open for further replies.

philly212

IS-IT--Management
Feb 22, 2008
50
US
I need some help. Here's my example of some data.
10 BK 5 CLR 2210 RED
2199 BK 10 RED 55415 CLR
The format is number space color, etc.
I had it all parsed out but was then told the number may be more than 2 digits, so I had to throw that code out. I'm creating formulas for each color so I can do some sums.
Ie. for color CLR, I can parse the data(if any) to the right of the color, but im having trouble parsing the data on the left of the color. below is the example code for CLR color.

//masterclear would be the data, if clr exists then....
if Instr(masterclear,"CLR")>0 then left(masterclear,(instr(masterclear,"CLR")+2))
which gives: 10 BK 5 CLR or 2199 BK 10 RED 55415 CLR
but I dont know how to parse the left side.

Any ideas?
 
I think I found a solution, unless there's a better way to do this.
In the group header, I set the colored result to 0, then in the group footer I display the result. Looks like I will have to make 2 formulas for each color. Do I need to worry about doing an evaluateafter ?
 
You need a separate variable for each color for the grand total that is not reset in the group header. No, you don't need to specify evaluateafter. You can build the accumulation into the same detail level formula.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top