Link to home
Start Free TrialLog in
Avatar of ssblue
ssblueFlag for United States of America

asked on

Need to find special characters, hidden spaces, extra spaces in excel

Need to find special characters, hidden spaces, extra spaces in excel.

I need to prepare list for upload to SAP.
Avatar of Rgonzo1971
Rgonzo1971

Hi,

Could you be more precise, send a dummy?

Regards
Avatar of ssblue

ASKER

PO LONG TEXT
ASSEMBLY, `RELAY
KIT, VALVE REPAIR, VEE-BALL V150,  V200,  V300
GAUGE, PRESSURE, 1"CH
ASSEMBLY, COVER
KIT, REPAIR, z PACKING, SINGLE TFE, 1/2 STEM
BREAKER, MINIATURE, STANDARD CONFIGURATION, AC, 1-POLE CONFIGURATION, TRIP CURVE C, 2 AMP
SEALSTRIP, STL
BLOWER, MEDIUM PRESSURE FLUIDIZING AIR, 7.5 PSI, 200 HP, 3150 ACFM
EXPANSION JOINT, UNIT 1A ID FAN LUBRICATING AND COOLING NON-DRIVE END BEARING, 2.5 PIPE, NON-CODE PIPE CLASS, SST, A106 GR. B FLANGED END, OIL, 250F,, 14PSIG
VALVE , BALL, 3~

I need to clean up this data for upload to SAP.
a dummy with the wanted result would be helpful
Would you have only A-Z, a-z, 0-9, space and comma in your text?
May be it's easier for you to say what you want left in your text?
Avatar of ssblue

ASKER

so I may not know what is there.  I know I would want A-Z, a-z, 0-9, space and comma in the text and then there could be ' and " for inches and feet designations. I know I could find these things separately but I was hoping for something that might fix everything all at once.
What type of file is the text in (.xlsx or .xlsm)?
Is the text located in one cell or several cells?
Is the text in one spreadsheet or more than one spreadsheet?
Try the attached file.
It loop through each worksheet in the active workbook, and test each selected range / cell.
You can make selections on several worksheet by
Select a worksheet
Hold down Ctrl and select a range of cells,  more than one range can be selected on each worksheet.
Repeat on next worksheet.
Execute the macro.
The macro clean only selected cells.
Your text sample look like this after my test run:

PO LONG TEXT
ASSEMBLY, RELAY
KIT, VALVE REPAIR, VEEBALL V150, V200, V300
GAUGE, PRESSURE, 1"CH
ASSEMBLY, COVER
KIT, REPAIR, z PACKING, SINGLE TFE, 12 STEM
BREAKER, MINIATURE, STANDARD CONFIGURATION, AC, 1POLE CONFIGURATION, TRIP CURVE C, 2 AMP
SEALSTRIP, STL
BLOWER, MEDIUM PRESSURE FLUIDIZING AIR, 75 PSI, 200 HP, 3150 ACFM
EXPANSION JOINT, UNIT 1A ID FAN LUBRICATING AND COOLING NONDRIVE END BEARING, 25 PIPE, NONCODE PIPE CLASS, SST, A106 GR B FLANGED END, OIL, 250F,, 14PSIG
VALVE , BALL, 3
cleanTheText.xlsm
SOLUTION
Avatar of Matt Nicholas
Matt Nicholas
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ssblue

ASKER

Thanks guys!
Thanks ssblue!