- 1). Click the "Developer" tab in Excel, and click "Visual Basic."
- 2). Click the name of the VBA file in the left hand window where you want to insert the trim function.
- 3). Cut and paste the following lines of code into the VBA code:
"Dim LResult As String
LResult = Trim (" text ")".
- 4). Replace "text" in the code with the actual text you want to trim. In the above example, the blank spaces would be removed from the statement, passing "text" to the variable LResult.
EDITOR PICKS & Articles
- How to Fill Windshield Washer Fluid
- How to Repair Brake Pads on a Saturn 2000 SL1
- Instructions on Replacing Alternator Belts
- How to Replace My Brake Pads
- How to Fix Scratches on a 2008 Toyota Corolla
- BMW Auto Repair and Services
- How to Check the Coolant Level on a 2010 700 Grizzly Yamaha ATV
- How to Change the Serpentine Belt on a 2003 B3000 Mazda Truck
- How to Look for Wear or Leaks on Hoses and Clamps in a Ford Mustang
- Engine Specs of a Chevy Cobalt Supercharged
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time
Stay With Us