+ Reply to Thread
Results 1 to 28 of 28

Copy Rows To Predefined Sheet Based on Date Range Using Form or Message Box

Hybrid View

Isacc Copy Rows To Predefined Sheet... 01-29-2013, 01:43 PM
Isacc Re: Copy Rows To Predefined... 01-30-2013, 09:13 AM
arlu1201 Re: Copy Rows To Predefined... 01-30-2013, 02:03 PM
Isacc Re: Copy Rows To Predefined... 01-30-2013, 02:41 PM
Isacc Re: Copy Rows To Predefined... 01-31-2013, 09:08 AM
Isacc Re: Copy Rows To Predefined... 01-31-2013, 01:38 PM
arlu1201 Re: Copy Rows To Predefined... 01-31-2013, 02:49 PM
Isacc Re: Copy Rows To Predefined... 02-01-2013, 11:28 AM
arlu1201 Re: Copy Rows To Predefined... 02-04-2013, 11:04 AM
Isacc Re: Copy Rows To Predefined... 02-04-2013, 11:13 AM
arlu1201 Re: Copy Rows To Predefined... 02-04-2013, 11:17 AM
Isacc Re: Copy Rows To Predefined... 02-04-2013, 11:19 AM
arlu1201 Re: Copy Rows To Predefined... 02-04-2013, 12:11 PM
Isacc Re: Copy Rows To Predefined... 02-04-2013, 01:12 PM
arlu1201 Re: Copy Rows To Predefined... 02-04-2013, 02:17 PM
Isacc Re: Copy Rows To Predefined... 02-04-2013, 03:56 PM
Isacc Re: Copy Rows To Predefined... 02-04-2013, 05:57 PM
arlu1201 Re: Copy Rows To Predefined... 02-05-2013, 08:24 AM
Isacc Re: Copy Rows To Predefined... 02-05-2013, 09:56 AM
zbor Re: Copy Rows To Predefined... 02-05-2013, 10:18 AM
arlu1201 Re: Copy Rows To Predefined... 02-05-2013, 10:34 AM
Isacc Re: Copy Rows To Predefined... 02-05-2013, 10:45 AM
arlu1201 Re: Copy Rows To Predefined... 02-05-2013, 10:47 AM
Isacc Re: Copy Rows To Predefined... 02-05-2013, 10:57 AM
arlu1201 Re: Copy Rows To Predefined... 02-05-2013, 11:13 AM
benishiryo Re: Copy Rows To Predefined... 02-05-2013, 11:27 AM
Isacc Re: Copy Rows To Predefined... 02-05-2013, 02:15 PM
Isacc Re: Copy Rows To Predefined... 02-06-2013, 09:25 AM
  1. #1
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,136

    Re: Copy Rows To Predefined Sheet Based on Date Range Using Form or Message Box

    Does this help:

    Private Sub Button1_Click()
    
    Dim ws As Variant
    Dim lrow As Long, i As Long
    
    Sheets("Budget").Range("A2:AG1000").ClearContents
    
    'On Error Resume Next
    For Each ws In Array("Conrad", "Robert", "Amy")
        With Worksheets(ws)
            lrow = .Range("E" & .Rows.Count).End(xlUp).Row
            For i = 3 To lrow
    
               If .Range("M" & i).Value  >= DateValue(DateLokup.TextBox1.Value) And .Range("M" & i).Value <= DateValue(DateLokup.TextBox2.Value) Then
                    .Range("B" & i & ":AG" & i).Copy Worksheets("Budget").Range("B" & Rows.Count).End(xlUp).Offset(1, 0)
                End If
            Next i
        End With
    Next ws
    
    Unload DateLokup
    
    End Sub
    I'm entering days as d/m/yy and it works. Try other formats.
    Last edited by zbor; 02-05-2013 at 10:20 AM.
    Never use Merged Cells in Excel

+ Reply to Thread

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