+ Reply to Thread
Results 1 to 4 of 4

How can I get macro to recognize every time a number changes?

  1. #1
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    294

    How can I get macro to recognize every time a number changes?

    Hi,

    The code below copies data and places it on it's own sheet. It works great. My problem is I want it take the data and place it on it's own sheet every time the number changes. Example: Right now the below code will take the data for PO # 101012752 and place it on it's own sheet. I want to change the code so it will recognize every time the PO # changes and place it on it's own sheet without me having to go in and manually change the PO # in the code each time. Any thoughts?

    Thank you so much in advance for your helpe.

    Eddie.


    'Copies data onto its own sheet.

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor boylejob's Avatar
    Join Date
    02-22-2007
    Location
    Forest City, NC
    MS-Off Ver
    2003
    Posts
    562
    Eddie,

    In the VBA Editor you can go to the Sheet where the change will occur. Using the Worksheet_Change you would have it look at the address of the cell where the change occur. In your case you would reference the cell containing the PO #. If that cell changes, call the code for moving the information

    Would look something like the code below where "$A$1" would be the cell where the PO # is located
    Please Login or Register  to view this content.
    You would then set this line of your code to be a cell reference instead of a manual entry.
    Please Login or Register  to view this content.
    Does this help any?
    Sincerely,
    Jeff

  3. #3
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    294
    Yes it did help. Thank you very much. I'm sorry I forgot to reply quicker than this.

    Eddie.

  4. #4
    Forum Contributor boylejob's Avatar
    Join Date
    02-22-2007
    Location
    Forest City, NC
    MS-Off Ver
    2003
    Posts
    562
    Eddie,

    Glad it helped!

+ 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