Getting messy data into one line

snipescc

Board Regular
Joined
Aug 29, 2010
Messages
130
A big part of my job is getting spreadsheet data from different clients and putting the information into our database. Most of our 200+ companies send reasonable spreadsheets I can manipulate pretty fast, but one insists on sending what I think is a scan of their paychecks, converted into Excel. There are about 6-10 lines per person, and I need to get a piece of data from people. However, not everyone has the piece of data we need, and where it is isn't consistent. Here is a cleaned up sample of the data. I need the number next to the word FEE. However, sometimes FEE is in column M, sometimes column N. Sometimes the number is right next to it, sometimes there is a blank cell between. So I'm looking in columns M & N to get a number that might be in N, O, or P. To make matters more complicated, the numbers are stored as text, so a formula like SUM or ISNUMBER won't necessarily work. I can multiply everything in those columns by 1 to force them into numbers, but that adds a 0 to every null cell. It's do-able, but might mess up any formula that is looking for if a cell is blank.

My current thought is using a series of IF statements to tell if a cell has a name. If it does, use either vlookup or sumif for getting the fee amount, by checking if FEE is in M, then sum the numbers in the two cells next to it. If it isn't, same for column N.

My expectation is I will have at least one, possibly 2 other sheets to help me transform the data, so I still have the original data if I need to check something manually.

Does anyone have some other ideas or something that would simplify this process?

I'm sorry this isn't in a proper grid. My security settings aren't letting me give assess to my clipboard. I put the data in this google sheet if anyone wants to see it in a proper grid.




<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
abcdefghijklmnopq
PerControlPay DatePeriod End DateJob Code
Smith, Bob1234Pay No: 12019092719/27/20199/20/2019DCW
OT3.51263ZFee10.86stuff421.02
REG4012480Zstuff516.67
stuff60.33
stuff752.66
stuff87.87
stuff933.66
43.554310.86132.21
Check Printed:121880Check Amount:0Direct Deposit:399.93Net:399.93
PerControlPay DatePeriod End DateJob Code
Jones, Alice1235Pay No: 12019092719/27/20199/20/2019DCW
PDATA3.51242ZFee3.84stuff147.43
REG12.512150Zstuff155.89
stuff160.12
stuff173.82
stuff182.78
stuff1911.91
161923.8431.95
Check Printed:121678Check Amount:0Direct Deposit:156.21Net:156.21

<tbody>
</tbody>
<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
 
Last edited:

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
I can multiply everything in those columns by 1 to force them into numbers, but that adds a 0 to every null cell. It's do-able, but might mess up any formula that is looking for if a cell is blank.

If you are using Excel then try using Text to Columns i.e.

Select the column, click "Data" tab - click "Text To Columns" - select "Delimited" and click "Next", make sure "Other" is not checked and click "Next", select General and click "Finish"
 
Upvote 0

Forum statistics

Threads
1,214,826
Messages
6,121,792
Members
449,048
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top