Results 1 to 7 of 7

Deleting Content of a Cell till the End of Right (Not Row)

Threaded View

svanan Deleting Content of a Cell... 11-08-2009, 08:07 AM
Leith Ross Re: Deleting Content of a... 11-08-2009, 02:36 PM
svanan Re: Deleting Content of a... 11-09-2009, 06:52 AM
svanan Re: Deleting Content of a... 11-10-2009, 02:46 PM
shg Re: Deleting Content of a... 11-10-2009, 03:03 PM
  1. #1
    Registered User
    Join Date
    11-08-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    6

    Deleting Content of a Cell till the End of Right (Not Row)

    Dear All,

    I need help on Excel 2007 Macro , the below coding searches for a string "recvtiming" in a cell as a wildcard and delete it entire row once it founds it in a single active sheet.

    Question,
    1. How do I manipulate it to search for the same string and upon finding
    a) Delete its cell content and all the contents from its right hand of side till its last column which have a value from the same row on all 50 sheets in the workbook.

    e.g
    a b c d recv 0 1 2 3 4

    It should return,
    a b c d

    ====================Start Code ====================
    
    With ActiveSheet
        .Select
    
        ViewMode = ActiveWindow.View
        ActiveWindow.View = xlNormalView
        .DisplayPageBreaks = False
    
        Firstrow = .UsedRange.Cells(1).Row
        Lastrow = .UsedRange.Rows(.UsedRange.Rows.Count).Row
            
        'Loop from Firstrow to Lastrow
        For Lrow = Firstrow To Lastrow
            
        Firstcol = .UsedRange.Cells(1).Column
        Lastcol = .UsedRange.Columns(.UsedRange.Columns.Count).Column
        Currentcell = ActiveCell.Address.Column
            
                If Application.CountIf(.Rows(Lrow), "recv*") > 0 Then Range(Cells(Lrow, Currentcell), Cells(Lrow, Lastcol)).ClearContents
                
        Next Lrow
    
    End With
    ====================End Code ====================
    Last edited by svanan; 11-10-2009 at 07:21 PM. Reason: Conforming to the guideline

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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