Solved

Parse out field

Posted on 2013-05-16
14
228 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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 81

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 81

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 81

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

863 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

23 Experts available now in Live!

Get 1:1 Help Now