+ Reply to Thread
Results 1 to 4 of 4

replace 0w by null

Hybrid View

  1. #1
    Registered User
    Join Date
    02-23-2015
    Location
    hk
    MS-Off Ver
    window7
    Posts
    240

    replace 0w by null

    Dear all

    Attached with file, the column a(sheet1) after vba code
    Should same as column a(sheet2).

    That is: the code should replace 0w by null
    But the code don’t work

    Pls help

    Tks
    Tom
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Hi ! Try this !


    Like explained in VBA help so as a very beginner starter :

    PHP Code: 
    Sub Demo1()
        
    Sheet1.Cells(1).CurrentRegion.Replace "w"""xlWhole, , True
    End Sub 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !

  3. #3
    Valued Forum Contributor
    Join Date
    12-22-2015
    Location
    HK
    MS-Off Ver
    2010
    Posts
    532

    Re: replace 0w by null

    Sub Replace()
    
    'LastRow = Cells(Rows.Count, 1).End(xlUp).Row
    'For i = 1 To LastRow
        
     'Columns("a:a").Select
     Columns("a:a").Replace What:="w", Replacement:="", LookAt:=xlWhole, _
     SearchOrder:=xlByColumns, MatchCase:=True, SearchFormat:=False, _
     ReplaceFormat:=False
     
     
    End Sub

  4. #4
    Registered User
    Join Date
    02-23-2015
    Location
    hk
    MS-Off Ver
    window7
    Posts
    240

    Re: replace 0w by null

    Thanks All, That work perfect

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. SQL: How do I replace NULL ( empty ) with zero in a sql query. For instance:
    By kbdb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-09-2018, 03:31 PM
  2. [SOLVED] Replace empty string with null
    By anteagles20 in forum Excel General
    Replies: 7
    Last Post: 04-08-2014, 07:16 AM
  3. Find a cell that has a null value, and replace with an empty string.
    By skania in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-20-2013, 12:49 PM
  4. [SOLVED] Slow process to replace blocks of zeros with null
    By Ariostea in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-27-2012, 10:49 PM
  5. Code to replace null and not null strings
    By tigertim71 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-27-2008, 05:07 PM
  6. [SOLVED] Replace Null value in Coloumn
    By Plumdodge in forum Excel General
    Replies: 2
    Last Post: 11-08-2005, 07:10 PM
  7. Replace null string with blank cell
    By gjcase in forum Excel General
    Replies: 2
    Last Post: 08-09-2005, 09:13 AM

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