+ Reply to Thread
Results 1 to 12 of 12

Grabbing a row from one file and making another (or sheet)

  1. #1
    Registered User
    Join Date
    11-20-2006
    Posts
    15

    Grabbing a row from one file and making another (or sheet)

    Once again I am asking for a bit of help (this place is so great!).

    I have two excel files (I guess I could actually do it on two sheets if needed).


    File one has a row of information-- rows will be added and removed. Each row is a customer's mailing information, with each cell containing different information needed for the label printing program.


    File two has one column and each row has a number in it. The number in each row in file two is also located in a certain cell in the file one.

    When there is a match I would like to have a third file created (or sheet), deleting the row from file one (sending to to the third file or sheet).

    Can it be done?

  2. #2
    Registered User
    Join Date
    11-20-2006
    Posts
    15
    I was also thinking that instead of the second file (or sheet) that there can just be an enter field that when entered and a match found the row gets pulled from first file (or sheet) and sticks it in the in the third file (or sheet) =)

    I don't know if this is against the rules of the forum, but I own a bookstore and will be happy to donate a little shopping spree on my site (over one million titles) to who takes this on or if they like for a contest on this site for all the users to enter.... If this breaks some kind of rules, just ignore this then I can only ship within the USA though...

  3. #3
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,


    If it is not too big of a constraint for you to have the 3 worksheets in the same workbook ... it would make your life somewhat easier ...

    Then, yes, a macro or even an event macro can handle your request ...

    HTH
    Carim
    Last edited by Carim; 12-10-2006 at 04:59 AM.

  4. #4
    Registered User
    Join Date
    11-20-2006
    Posts
    15
    I tried taking apart the macro you made for me a few weeks ago and fitting it for this new project. I am getting jammed up a bit with a variable not defined. Mind taking a look see?
    Attached Files Attached Files

  5. #5
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    May be something along these lines ...

    Please Login or Register  to view this content.
    HTH
    Carim

  6. #6
    Registered User
    Join Date
    11-20-2006
    Posts
    15
    Carim:

    I tried changing the range from ("A:A") to ("N:N") but it goes into debug mode.


    Is it possible to move the search from column a to n?

    or...

    How would one go about searching the enitire worksheet and then having it move the row where the search result was found? There will always only be one search result as each number is unique.

    Thank you for your effort. I am actually learning a bit here.

    Quote Originally Posted by Carim
    Hi,

    May be something along these lines ...

    Please Login or Register  to view this content.
    HTH
    Carim
    Last edited by Carim; 12-12-2006 at 12:17 PM.

  7. #7
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Why column N ... which is empty
    unless you have moved all data from column A to N ... there is no reason

    Is the initial code working with the sheet you provided ???


    Carim

  8. #8
    Registered User
    Join Date
    11-20-2006
    Posts
    15
    Quote Originally Posted by Carim
    Why column N ... which is empty
    unless you have moved all data from column A to N ... there is no reason

    Is the initial code working with the sheet you provided ???


    Carim
    Actually it isn't working quite right. It cuts from sheet one every time, but does not paste it; it only pastes the first time. The rest get lost in cyberspace.

    As for N, I have already worked around that problem by copying it to column A. I was more curious than anything...

  9. #9
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    Is the following code OK ...

    Please Login or Register  to view this content.
    HTH
    Carim

  10. #10
    Registered User
    Join Date
    11-20-2006
    Posts
    15
    No. I am getting debug and this line is highlighted

    Please Login or Register  to view this content.
    The excel file, the row to be cut is highligted and but nothing is moved to the second sheet.

    Quote Originally Posted by Carim
    Hi,

    Is the following code OK ...

    Please Login or Register  to view this content.
    HTH
    Carim

  11. #11
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    Sorry I did not take the time to test ...

    Please Login or Register  to view this content.
    HTH
    Carim

  12. #12
    Registered User
    Join Date
    11-20-2006
    Posts
    15
    Carim:

    Thank you. Everything is working well. Just one more small request. How can I make it so the input box is always the one highlighted. As it stands now, one must scroll back up and highlight the input box after each entry. It's time consuming when there are a lot of rows.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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