+ Reply to Thread
Results 1 to 28 of 28

try to Copy entire Row if active cell equals variable

Hybrid View

  1. #1
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: try to Copy entire Row if active cell equals variable

    Quote Originally Posted by Mfederman View Post
    You are awesome. I REALLY appreciate you taking the time to put this together!
    I just copied and pasted the code in to a new module and tried to step through and got a new error:

    "Run-time error '6': Overflow"

    I'm not sure what that means.

    The line that gets highlighted when I hit debug is
    for i = 2 To lRow
    "
    Yep, sorry...Need to declare i As a Double and not Integer
    So
    Dim I As Integer
    must be
    Dim i As Double

    EDIT: But seriously go with my second code...Post # 13 Works much better.
    Last edited by Sintek; 04-25-2017 at 02:52 PM.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  2. #2
    Registered User
    Join Date
    04-25-2017
    Location
    Campton Hills, Illinois
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: try to Copy entire Row if active cell equals variable

    This one now works great, but also does not return any results when I enter the payroll date I'm looking for.

    Again, I can't thank you enough for your help on this!

    Quote Originally Posted by sintek View Post
    Yep, sorry...Need to declare i As a Double and not Integer
    So
    Dim I As Integer
    must be
    Dim i As Double

+ 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] Macro to search Active cell, then copy entire row & sort the list
    By teaboi in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-08-2016, 09:50 AM
  2. [SOLVED] Return entire row if cell equals
    By Moedeb27 in forum Excel General
    Replies: 5
    Last Post: 08-03-2016, 07:28 PM
  3. Replies: 3
    Last Post: 07-16-2015, 09:29 AM
  4. [SOLVED] Copy Entire Row if Cell Value Equals X or Y or Z
    By TShelt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-01-2014, 04:38 PM
  5. Replies: 1
    Last Post: 07-31-2013, 10:21 AM
  6. [SOLVED] Macro to Copy Entire Rows if Column Equals
    By Andrew.Trevayne in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-21-2012, 09:46 PM
  7. Copy Range to New Line - Save Active Cell to Temp Variable
    By ngay528 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-23-2009, 05:00 PM

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