trim excess spaces

  1. Ottsel

    Run-time error when using Worksheets("Sheet1").Activate

    I'm using the following code before running my script to help cover any errors, as people sometimes add spaces at the end of titles causing my macro to crash so, before running I was attempting to make sure the sheet - which the name never changes - would be selected before executing to avoid...
  2. E

    Trim Function

    Please could someone help with the Trim Function below. It says wrong number of arguments? Sub Group_OrderNos() Dim ws As Worksheet Dim Rng As Range Dim LRow As Long Dim Row As Long Dim Row_1 As Long Dim Row_2 As Long Dim ct As Long Dim fr As Long...
  3. G

    VBA - Defining a Range within a Trim

    hi first post - looking for help creating a Trim VBA for a specific range on a worksheet. Range in question is "S2:S200000", on a worksheet called "RAW DATA". Aim of this is to remove extra spacing before and after the text in the cell Have done some digging online and have found some but...
  4. K

    Get rid of leading spaces, Trim and Clean doesn't work, Code shows 0

    Hi gurus, I've read many posts on various forum to solve the problems on the leading space(or space-like stuff), but after trying many functions, including Trim(), Trim(Clean()),Code(Left()), and other ways, I still cannot get rid of it... Originally I pasted these from a word document, and...
  5. E

    Automatically rename all tables on a worksheet

    Hi all! I am trying to rename all the tables on a worksheet and understand that I need to use VBA to do so.. I'm not very experienced so I was wondering if I can get some help here. Basically the layout of the table is like this: <tbody> Name Part 1 Name Part 2 Column1 Column2 Column3...
  6. J

    TRIM Macro - Syntax Explanation

    Hi All, I have come across this cracking macro to quickly iron out extra spaces inputted erroneously by users! The thing is it removes the additional spaces on the Left, Middle & to the Right of the text entry. Can anyone help me interpret these specific parts of macro, bits highlighted in...
  7. T

    Reducing Formulas for finding Text in a String

    Happy Monday Everyone I can make my way around excel (just), but once I figure out a way to get something working, I usually leave it there. I created a formula to build a Sheet VKUP_PAGE to use as a VLOOKUP table and return one of 3 variants of the following examples in Sheet TESTPAGE...
  8. M

    Trim / Substitute / Replace / Len - replacing excess spaces with a comma and space - read on!

    Good day Demigods, Sheet 1, cell A1 contains alphanumeric user entered data and is referenced on ten other sheets. Some users enter data as , Others enter data as, for example, - curse them! I'm not bothered how it looks on Sheet 1, cell A1, but for the other worksheets, I want the data the...

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