+ Reply to Thread
Results 1 to 3 of 3

Find a value in a column and copy all data above that row code not working.

  1. #1
    Registered User
    Join Date
    11-25-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    61

    Find a value in a column and copy all data above that row code not working.

    Hi all,
    I've been trying to modify the following code to find the value "Module Index" in column A. I then need the code to save the row number that the value was found in and copy a range from ("A2:V row number")

    I keep getting an "object required" error on the following code line

    Set intFindrow = wbTargetBook.Sheets(strName).Range("A:A").Find(What:="Module Index", LookIn:=xlValues)

    I'm very new to this so the solution could be very easy or very complicated . Any help would be greatly appreciated!

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Find a value in a column and copy all data above that row code not working.

    .Find returns a range object.
    Please Login or Register  to view this content.
    Untested.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Registered User
    Join Date
    11-25-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Find a value in a column and copy all data above that row code not working.

    Thanks Solus, Works great!

+ 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] Trying to find the right code to copy a column from one worksheet and paste to another
    By mw91 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 11-15-2013, 01:57 PM
  2. VBA code not working for copy and pasting data based on criteria.
    By harkin123 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-16-2013, 04:55 AM
  3. Code: Find, Copy, Paste not working
    By ufopilot3 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-26-2012, 03:40 PM
  4. Code to find and copy specific data
    By dwhite30518 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-22-2012, 05:17 PM
  5. code to find text, offset 1 column and paste to new workbook not working
    By trillium in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-10-2011, 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