Results 1 to 8 of 8

Need to add the cut function in the macro

Threaded View

franciaul Need to add the cut function... 06-17-2014, 03:36 AM
Richard Buttrey Re: Need to add the cut... 06-17-2014, 03:43 AM
franciaul Re: Need to add the cut... 06-17-2014, 05:22 AM
Richard Buttrey Re: Need to add the cut... 06-17-2014, 06:08 AM
franciaul Re: Need to add the cut... 06-17-2014, 06:39 AM
Richard Buttrey Re: Need to add the cut... 06-17-2014, 06:47 AM
franciaul Re: Need to add the cut... 06-17-2014, 06:56 AM
Richard Buttrey Re: Need to add the cut... 06-17-2014, 08:28 AM
  1. #1
    Registered User
    Join Date
    09-20-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003
    Posts
    12

    Need to add the cut function in the macro

    Hello ,

    I need to cut the rows after I copied them in the new sheet (If Not foundTrue Then...)

    Does someone know how to add this function in the macro below and how to add a pop up window if everything is found :True ?

    Thanks in advance!


    ______________________________________________________________


    Sub compareAndCopyBRvsCommence()
    
    Dim lastRowE As Integer
    Dim lastRowF As Integer
    Dim lastRowM As Integer
    Dim foundTrue As Boolean
    Dim New_file_name
    
    
        
        Sheets(3).Select
        Worksheets.Add
        Sheets(3).Name = "Project_Not_Closed"
    
    Application.ScreenUpdating = False
    
    lastRowE = Sheets("Commence").Cells(Sheets("Commence").Rows.Count, "K").End(xlUp).Row
    lastRowF = Sheets("Commence").Cells(Sheets("Commence").Rows.Count, "AJ").End(xlUp).Row
    lastRowM = Sheets("Project_Not_Closed").Cells(Sheets("Project_Not_Closed").Rows.Count, "A").End(xlUp).Row
    
    
    
    For i = 2 To lastRowE
    foundTrue = False
    For J = 2 To lastRowF
    
    If Sheets("Commence").Cells(J, 36).Value = Sheets("Commence").Cells(i, 11).Value Then
        
            foundTrue = True
            Exit For
            
        End If
    
    Next J
    
    If Not foundTrue Then
    
        Sheets("Commence").Rows(i).Copy Destination:= _
     Sheets("Project_Not_Closed").Rows(lastRowM + 1)
        lastRowM = lastRowM + 1
    
    
     End If
     
     Next i
     
    
     
     Sheets("Project_Not_Closed").Activate
    
    
    Cells(1, 1) = "Project not Closed"
    
     
    Application.ScreenUpdating = True
    
    'New_file_name = Application.GetSaveAsFilename(, "Microsoft Excel Workbook (*.xls), *.xls")
    'ActiveSheet.Copy
    'ActiveWorkbook.SaveAs Filename:=New_file_name, FileFormat:=xlNormal
    'ActiveWindow.Close
    
    'Sheets("Mismatch BR_Commence").Delete
    
    
    
    End Sub
    Last edited by franciaul; 06-17-2014 at 05:21 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Using the Find Function inside the Right function in macro
    By namruht in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-28-2013, 02:12 PM
  2. Macro exits prematurely from function after calling other function
    By LouisPhilippe in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-22-2013, 03:22 AM
  3. [SOLVED] Help : Macro Function - unable to apply filter function after macro the file.
    By Shermaine2010 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-05-2013, 12:50 AM
  4. Macro function Get Comment Text function with format
    By guynextdoor in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-28-2010, 01:08 AM
  5. Macro Function:create a new function
    By Tomas in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 05-09-2006, 07:55 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