Results 1 to 8 of 8

Using vba -how do I remove characters from right of space on all cells in specific columns

Threaded View

  1. #5
    Registered User
    Join Date
    06-08-2021
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    4

    Re: Using vba -how do I remove characters from right of space on all cells in specific col

     Sub Test()
    
    Dim c As Range
    
        For Each c In Sheet1.Range("E1", Sheet1.Range("G" & Sheet1.Rows.Count).End(xlUp))
              c.Replace What:=Right(c, 12), Replacement:=""
        Next c
        
    End Sub

    This also works but not all cells format as dates

    When I use the column filter only some of the cell values list within the relevant year.

    Attachment 735840

    even though the entire column is formatted as date d/mm/yyyy
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by gbegnell; 06-08-2021 at 11:57 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] How to remove first 8 characters (including space) in a string
    By bala04msw in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-05-2021, 06:53 AM
  2. [SOLVED] Create a formula to remove last two characters from a cell if the 2nd character is a space
    By SellMeTv2 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-28-2019, 11:13 PM
  3. Remove all characters before space in line
    By gartie in forum Excel General
    Replies: 9
    Last Post: 08-29-2012, 05:52 PM
  4. [SOLVED] Trim Specific Values and Remove last right space
    By jantonio in forum Excel General
    Replies: 3
    Last Post: 05-02-2012, 08:40 AM
  5. Replies: 3
    Last Post: 04-05-2012, 04:58 PM
  6. Remove all characters after space
    By vsantoro in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-02-2010, 04:46 PM
  7. [SOLVED] Remove varying amounts of space characters
    By Access Joe in forum Excel General
    Replies: 4
    Last Post: 01-13-2006, 06:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1