trim macro

  1. A

    Excel VBA- Range.find when range contains leading and trailing spaces

    Hi, I am using a custom function in VBA to check whether a range contains a particular value or not and it works fine. Here is the code - Function searchValue(fromSheet As Worksheet, value As String, col As String) As Integer Set findrange = fromSheet.Range(col).Find(What:=Trim(value)...
  2. 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...
  3. F

    Clean/Trim during data import

    Hi, I'm copying data between two excel: ... For i=2 to rows_x TEMP_city = ws.Range("B" + CStr(i)).Value 'this value can contains space wsSC.Range("A" & AT_rows).Value = TEMP_city ... next i ... How can I during this process use Trim or Clean function, to delete "space" etc.??
  4. J

    Macro: Add trimming step to existing macro

    This macro currently copies a range of cell which I select and then exports it to a CSV for me. I love it but i need it to do a little more.. Application.DisplayAlerts = False Set myrng = ActiveWindow.RangeSelection Set newbook = Workbooks.Add With newbook .Title = "export" .SaveAs...

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