1. I

    How to edit this copy and paste VBA code to not use a criteria if not found?

    Hello. I have this copy and paste code that copies cell values from one workbook to another. Copy from pickorder. Paste into wave planner. To match it up it gets the staging location in column D example, "STG.DD35" and the dsp in column E "M5DV." However sometimes this first sheet, referenced as...
  2. C

    Trim, Clean using Evaluate running into 256 character limit

    Hello I have large datasets that I run automated processes on that I need to trim and clean and have been using: Function CleanSheets(arrShtNames As Variant, startRow As Long) Dim ws As Worksheet Dim rng As Range Dim LR As Long, Lc As Long For Each ws In Worksheets(arrShtNames) With ws...
  3. 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...
  4. 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.
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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" &...
  13. 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...
  14. 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 ")...
  15. 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( MP C307( IM...
  16. 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...
  17. 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...
  18. 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.
  19. 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)),"...
  20. 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...

Watch MrExcel Video

This Week's Hot Topics

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
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 "".
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