+ Reply to Thread
Results 1 to 12 of 12

Moving row, based on word "in", to worksheet Goods In!

  1. #1
    Registered User
    Join Date
    03-15-2013
    Location
    South West, England
    MS-Off Ver
    Excel 2010
    Posts
    27

    Moving row, based on word "in", to worksheet Goods In!

    I've tried several times, but I can't get this worksheet (example attached) to move goods when "in" (on the first three sheets) to worksheet "Goods In".

    I'm not averse to a new column A just for the word "in", if that might work.

    Password is: 0666

    Thanks,

    Nick
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Moving row, based on word "in", to worksheet Goods In!

    Try this code
    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose View | Macros
    Select a macro in the list, and click the Run button
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    03-15-2013
    Location
    South West, England
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Moving row, based on word "in", to worksheet Goods In!

    It works perfectly if I run the macro manually, but it doesn't seem to work automatically.

    Should I be doing something I'm not??

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Moving row, based on word "in", to worksheet Goods In!

    What do you mean by automatically? When you click on a button or when you type "In" in column A?

  5. #5
    Registered User
    Join Date
    03-15-2013
    Location
    South West, England
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Moving row, based on word "in", to worksheet Goods In!

    If I go into the developer tools then press F5 (on the macro) it works, but if you just type "in" in column A it doesn't do a thing.

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Moving row, based on word "in", to worksheet Goods In!

    Yes, the macro will need to be placed in a different location for it to run when you type in.

    If you want it to run as soon as you type in, then right click on each sheet from where you want to take the data, select view code and enter this code in -
    Please Login or Register  to view this content.
    Last edited by arlu1201; 03-15-2013 at 12:38 PM.

  7. #7
    Registered User
    Join Date
    03-15-2013
    Location
    South West, England
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Moving row, based on word "in", to worksheet Goods In!

    That's actually how I'd put the first one. Added the second on to the code and it still doesn't work automatically.

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Moving row, based on word "in", to worksheet Goods In!

    No its an independent code. You replace the 1st code with the 2nd code i gave you.

  9. #9
    Registered User
    Join Date
    03-15-2013
    Location
    South West, England
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Moving row, based on word "in", to worksheet Goods In!

    I've tried it all, but to no avail! The code works fine for me if I choose to view macros and then run the corresponding one. It's far better than doing it all manually!

    Thanks for your help.

  10. #10
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Moving row, based on word "in", to worksheet Goods In!

    In the 2nd code, you do not need to run it, just enter "In" without the quotes into the column and the row will be transferred.

  11. #11
    Registered User
    Join Date
    03-15-2013
    Location
    South West, England
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Moving row, based on word "in", to worksheet Goods In!

    I understand that. And I've tried that. I used to code, in various forms, back the the 80s/90s so I'm not completely unused to how code works. Whichever permutation I've tried it doesn't work automatically. Does it matter that I'm using Office 2010?

  12. #12
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Moving row, based on word "in", to worksheet Goods In!

    Hmmm i have not used office 2010 so am not sure. Do you have a sample that you can upload?

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.

+ 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