Solved

Parse out field

Posted on 2013-05-16
14
218 Views
Last Modified: 2013-05-16
I have the following fields that I need to pull data out of.  

PERCEPTIVE SOFTWARE, I#9005197267
CAREMEDIC, MEDICARE RT SUBSCRIPTION I# 5545926
RECLASS A007265 I#3076 TO BLDG IMP, MAR 2013
RECLASS A007265 I#3149 TO BLDG IMP, MAR 2013
RECLASS A007265 I#3154 TO BLDG IMP, MAR 2013


I want to pull the data for I#.  so the results would look like this:

9005197267
5545926
3076
3149
3154
0
Comment
Question by:Scotto111
  • 7
  • 4
  • 3
14 Comments
 

Author Comment

by:Scotto111
ID: 39172497
I have planned to make 2 formulas and combine them together.  This will allow for the 2 types of examples to use different formulas.
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39172539
This takes care of all the given cases

=REPLACE(TRIM(REPLACE(A9,1,FIND("I#",A9)+1,"")),FIND(" ",TRIM(REPLACE(A9,1,FIND("I#",A9)+1,""))&" "),9999,"")
0
 

Author Comment

by:Scotto111
ID: 39172557
I converted this to Monarch format:
=REPLACE(TRIM(REPLACE([Description],1,Instr("I#",[Description])+1,"")),Instr(" ",TRIM(REPLACE([Description],1,Instr("I#",[Description])+1,""))&" "),9999,"")

What is the &" "),9999 doing?

Monarch doesn't like the &.  Any ideas?  I know this isn't Monarch forum.
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39172570
Can you upload a fake file with this?
0
 

Author Comment

by:Scotto111
ID: 39172574
text file? or monarch file?
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39172598
Monarch
0
 

Author Comment

by:Scotto111
ID: 39172614
ssaqibh,
Too much work to clean the data and send it.  I am in a time crunch.  Really appreciate your help.  

I have 2 types of data in one field:
Type 1:
V# M667938 I# 9005044233 F# EMC R# 0000318829 Remit to: PERCEPTIVE SOFTWARE
V# M667938 I# 9005197267 F# EMC R# 0000318829 Remit to: PERCEPTIVE SOFTWARE
V# M668008 I# 10727008 F# EMC Vendor: KRONOS
V# M000379 I# 5545926 F# EMC Vendor: CAREMEDIC SYSTEMS, INC.
V# A001761 I# DUES13-H13022 F# EMC Vendor: CHA/CAHHS

Type 2:
PERCEPTIVE SOFTWARE, I#9005197267
CAREMEDIC, MEDICARE RT SUBSCRIPTION I# 5545926
RECLASS M000521 I#134914 PO#342533 TO EXP, MAR 13

For type 1 I have this working:
If([I#]>0,(Mid_XL([Description],[I#]+3,[F#]-[I#]-4)),"")

Can you use this to make a formula that will work on both?  Or even one that will work on Type 2 and I can combine them.
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39172635
I have never used these tables so I might not be able to set it up appropriately. Can you just feed the above data in a new file and set it up accordingly?
0
 

Author Comment

by:Scotto111
ID: 39172643
0
 

Author Comment

by:Scotto111
ID: 39172645
I posted the data into a text file.  Not sure how to set up model in monarch to send with it.  Hope you can help.
0
 
LVL 80

Accepted Solution

by:
byundt earned 500 total points
ID: 39172687
& is the concatenation character in Excel. The following two formulas are equivalent:
=TRIM(LEFT(SUBSTITUTE(TRIM(MID(A1,FIND("I#",A1)+2,99)) + " "," ",REPT(" ",99)),20))
=TRIM(LEFT(SUBSTITUTE(CONCATENATE(TRIM(MID(A1,FIND("I#",A1)+2,99)), " ")," ",REPT(" ",99)),20))

REPT is a function that returns multiple copies of specified text, in this case the space character.

Another way of avoiding concatenation uses the IFERROR function:
=TRIM(MID(A1,FIND("I#",A1)+2,IFERROR(FIND(" ",A1,FIND("I#",A1)+3)-FIND("I#",A1)-2,99)))
0
 
LVL 80

Expert Comment

by:byundt
ID: 39172726
Could you nest If functions within the Monarch string?
If([I#]>0,(Mid_XL([Description],[I#]+3,If([F#]>0,[F#]-[I#]-4),99)),"")
0
 

Author Comment

by:Scotto111
ID: 39172834
It can't do nested Ifs.  Can you make 2 separate fields for me - for each type of data?
0
 
LVL 80

Expert Comment

by:byundt
ID: 39173077
I don't know the syntax of Monarch formulas, but the following seems to me as though it would work:
Val(ltrim(lsplit(Description,2,"I#",2)))

Take the Description field and split into two parts at I#. Return the second part.
Remove any leading spaces from the previous returned value
Convert the previous returned value into a number. Conversion will stop at the first character that isn't a leading sign or digit.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now