+ Reply to Thread
Results 1 to 10 of 10

Remove lines based on cell value (remove lines in range, not entire row)

Hybrid View

  1. #1
    Registered User
    Join Date
    11-18-2015
    Location
    Madrid
    MS-Off Ver
    2016
    Posts
    95

    Re: Remove lines based on cell value (remove lines in range, not entire row)

    This worked for me:

    
    Sub Update()
    
    Dim X As Double, Y As Double, Z As Double
    
    X = 1
    Z = 1
    
    Do While Range("N6").Offset(X, 0).Value <> ""
    
        If Range("N6").Offset(X, 0).Value < 0 Then
            
            For Y = 1 To 5
                Range("N6").Offset(Z, Y).Value = Range("I6").Offset(X, Y).Value
            Next Y
            
            Z = Z + 1
            
        End If
        
    X = X + 1
    
    Loop
    
    End Sub
    See also the attached file.
    Attached Files Attached Files
    excelbat.com: free Excel tools, macros...

+ 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. [SOLVED] Remove Lines Based on Key Lookup
    By gkenens in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-30-2015, 03:53 PM
  2. [SOLVED] Macro neede to open text files from folder and remove all the lines except specific lines
    By genetist in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 10-07-2014, 02:44 AM
  3. [SOLVED] Macro to remove certain lines based on barcode format
    By ciuncky in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-10-2014, 07:38 AM
  4. [SOLVED] remove lines if a cell is blank
    By Christopherdj in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-01-2013, 10:08 PM
  5. .CSV, remove multiple lines in one cell
    By christianlie in forum Excel General
    Replies: 1
    Last Post: 10-21-2011, 09:44 PM
  6. How to remove these lines
    By Little Master in forum Excel General
    Replies: 2
    Last Post: 10-23-2008, 06:33 AM
  7. [SOLVED] remove blank lines from an entire spreadsheet
    By mdeanda in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-21-2005, 09:06 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