I have a file that comes out of my tax software that need to break out into columns and apply some kind of multi-field condition to.
The basic flow is data is stacked in the following order:
- IRS Form Number 1120 Pg. 1 Line number - Line Description
- Software's TRC No - TRC Description
- Software's TCC No - TCC Descripion
- Our Company's GL A/C No - G/L Description
Some inherent data flow considerations are:
- Form Line Numbers are alphanumeric and will include letters and numbers and will not be the same number of characters
- Form Line Descriptions while generally alpha numeric, can contain special characters (":", "&", "%", and "/" being the most common)
- TRC No are /d{2}-/d{3}
- TRC Descriptions while generally alpha numeric, can contain special characters (":", "&", "%", and "/" being the most common)
- TCC No are /d{3}
- TCC Descriptions while generally alpha numeric, can contain special characters (":", "&", "%", and "/" being the most common)
- G/L AC No.s are /w{6}
- G/L Descriptions are Descriptions while generally alpha numeric, can contain special characters (":", "&", "%", and "/" being the most common)
- Not every Line Number has a TRC Number
- If it does not have a TRC Number, it will not have a TCC Number, or G/L Number
- Not every TRC Number has a TCC Number
- If it does not have a TCC Number, it will not have a G/L Number
- Not every TCC Number has a G/L Number
- If a Line Number has a TRC Number, it can have 1 or more TRC Numbers
- If a TRC Number has a TCC Number, it can have 1 or more TCC Numbers
- If a TCC Number has a G/L No., it can have 1 or more G/L Numbers
- Each G/L No can have ONLY ONE Line No, TRC No., and TCC No.
End Result would be to organize the G/L accounts by Line No and Description; TRC No. and Description; TCC No. and Description. Then I would concatenate the TRC No and TCC No. in a separate column.
| GL Acct No. | GL Desc | 1120 Pg. 1 Ln No. | 1120 Pg. 1 Ln Desc | TRC/TCC Combo | TRC No. | TRC Desc | TCC No. | TCC Desc |
| 400000 | Sales | 1a | Gross Receipts or Sales | 30-100 010 | 30-100 | Gross Receipts or Sales | 010 | Gross Receipts/Sales |
| 400001 | Product Sales-Manual | 1a | Gross Receipts or Sales | 30-100 010 | 30-101 | Gross Receipts or Sales | 010 | Gross Receipts/Sales |
Ideally, I would be able to have a filter near the end where True would be !Null G/L and False I still would be able to see the Line No/TRC/TCCs that do not have an account, but that still has the TCC on the same line with its TRC and Line No on the same row on the F.
I have tried working with Parse and for the life of me I can't get the parse to work. I can text to columns, but because each is slightly different it creates more columns than I want and separates the TRC Number as it contains I dash.