trim

  1. I

    TRIM in VBA on a Range

    i have a range with 6000 rows, i want to apply a worksheet.TRIM function within VBA to eliminate spaces in-between and on the ends... problem is... nothing happens. whats best syntax for this? thanks <code> set rng = range("a1:a6000") With rng .value = WorksheetFunction.Trim(.value) End...
  2. R

    Need Excel Formula to trim spaces before Numbers

    Hi there, Please provide excel formula to trim spaces before numbers, i have received large data that contains spaces in each cell before the amount. I am using MS Office 2010. Thanks, Raaj.
  3. G

    Left Trimming VBA

    I'm struggling to find an easy way to simply trim a range of cells in a column (hard coded into VBA) and then left trimming by a number of my choosing (also hardcoded). I'm looking for something along the lines of this: Range("A1:A10").FormulaR1C1 = "=LEFT(TRIM(R[]C[],9))" But it's not working...
  4. M

    Check first & last letter from 2 columns against a column of words

    Hello, I'd like to check if a word contains matching first/last letters from 2 cells. I can't quite get it to work. In fact, it doesn't work at all - I over sold 'quite'. Eventually I will check MANY words for MANY different first/last matches so I want to automate obviously. Example data...
  5. F

    VBA trim data with space not from spacebar

    I have a two full columns of data that I need to trim. I can see the extra space at the end, but it's not a simple space from the spacebar. This data is downloaded from an Oracle database which as the source, I have no control over. I used =CODE(RIGHT(V2)) to see what the space is and I get...
  6. B

    Trim function on the same cell in multiple sheets

    Hi everyone, Hoping someone could point me in the right direction. I have a worksheet with multiple sheets that are all identical in layout (an export from another program) I need to trim one cell (F12) in each of these sheets. I've used the following formula on a cell to have it trim...
  7. J

    How to compare two set of list with formula

    Hi, How to compare 2 list with find match and mismatch with formula. Can some help me. Sheet4 <thead> E F G H I J </thead><tbody> 1 2 #FFFF00[/URL] "]LED TRIM PANEL LIGHT 5W RD 6500K #FFFF00[/URL] , align: right"]16 #FFFF00[/URL] "]Lts Glannz Solar 1.5w Led #FFFF00[/URL] , align...
  8. 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...
  9. B

    Trim Macro

    Hello guys, I need to write a trim macro. I am using the latest excel. I have an excel sheet with a lot of spaces and tabs wherevar I have data in the cells. I need an excel macro to get rid of those spaces and tabs. Can you help me? I couldn't figure by myself how can I write a trim Macro...
  10. T

    Trim Formula Not Working in Macro

    I appreciate any help on this. Not sure why but the "Trim" formula I'm using in this macro doesn't seem to work. I'm trying to add this formula to the entire column A and it's reading names from column B. Here's what I have: Sub AddFormula() Sheets("Loan_Info").Select Range("A1:A" &...
  11. L

    vba functions are not under application.(dot)

    Hi I wanted to use Trim function (Application.Trim) in my code. So I went to Object Browser and typed Application, thinking that under Application, I will see these functions. Otherwise why it is (Application.trim). But to my surprised, I could not find Trim or other functions under...
  12. L

    Trim in vba

    Hi Trim (VBA function) is not working here. The output message I go is " hello ................ there" Anything wrong with the code below? Thank you so much Sub mytrim() Dim s As String s = Trim(" hello there ")...
  13. M

    How to Trim Once Open Parenthesis Appears

    I have a bunch of cells that I need to trim off everything once and open parenthesis is found, including the open parenthesis Is there a formula that will do this? I have a few examples below The below 3 examples are in A1-A3 Aficio MP C3502(10.28.132.33) MP C307(10.28.132.58) IM...
  14. C

    Trim column in table databodyrange?

    So as discovered earlier I have an issue with extra spaces when I bring in data from another souce file. What I want is to be able to, using VBA script, trim all extra spaces, specifically after the text. My data is in a table titled "PasteTable" I have tried every solution I can think of...
  15. J

    TRIM in VBA with Substitute

    Hello, I have searched and t this point have not found anything that is very helpful with the substitute function in VBA. I am unsure why but sometimes TRIM does not remove the space after a the word in a cell. Someone gave me the following which seems to work...
  16. M

    Using TRIM with variable length fields

    Is it possible to use TRIM where the field lengths are not consistent? I need to remove the first character of a field but the length varies between 4 and 8 characters, so wondered what the options were please.
  17. M

    a text formula that i cant crack!

    I am trying to make a formula which basically says "find the first word that starts with G then choose the word AFTER it" but i cant configure the formula correctly, i am a bit of a novice! i can do it by combining IF statementslike this: =IF(TRIM(LEFT(SUBSTITUTE(MID(B4,FIND("G",B4),LEN(B4)),"...
  18. H

    add Trim to VBA code within a macro

    I have several VBA macros which i hopeful of adding only a 'delete leading and trailing spaces' to. i apply the macro to different size files, with different row and column lengths. What i'm after is a code that will apply specifically a 'delete leading and trailing spaces' to what i...
  19. L

    Trim unknown character return right not left

    Hi - I am trying to extract the back half of a text string. example: Linda Marie | LINDAM or Julie Smith Jones | JSJS. I want to bring back the LMGOVIN and the JSJS. Basically everything after the "|" (there are 2 spaces after the "|" if that matters. I can get the item in front of...
  20. B

    Range Object adds extra space that cannot be trimmed without specifically trimming the cell

    I have some code that is supposed to Trim the values of cells quickly, taken from here: https://www.thespreadsheetguru.com/the-code-vault/a-fast-way-to-clean-trim-cell-values-with-vba-code <code> With ActiveWorkbook.Worksheets(WSname) .Activate Dim rng As Object Dim Area As...

Some videos you may like

This Week's Hot Topics

Top