Clean up values

L

Legacy 15162

Guest
I had to link a file using a fixed width. It was the only viable solution at the time. Unfortunately this leaves some text that I need removed from my values. there are spaces and a | in the columns that I want to return. The field name currently is Plan Sales:[Field14]. How can I get rid of these spaces and | ? I need to just see the monetary value.
 
This is a bit messy but should work in A97 assuming that the pipe will only be at the end of the string (apart from spaces)

Sales: : IIf(InStr([Field 14],Chr(124))=True,Left(Trim([Field 14]),Len(Trim([Field 14]))-1),Trim([Field 14]))

Peter
 
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
I was able to find a method around my pipe broblem by using the left mid and right commands to pull the data without the problematic characters. thanks for the help!
 
Upvote 0

Forum statistics

Threads
1,221,625
Messages
6,160,908
Members
451,677
Latest member
michellehoddinott

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