+ Reply to Thread
Results 1 to 6 of 6

Copy only part of a cells contents based on a condition...

  1. #1
    Registered User
    Join Date
    09-27-2007
    Location
    Staten Island, NY
    MS-Off Ver
    Office 2013
    Posts
    64

    Copy only part of a cells contents based on a condition...

    Ok, let me try and explain this. (Will upload sample)

    I will have 2 columns. In column B, will be a list of invoice numbers. Now each one starts with the "job number" (Ex. 51APGC01) then a dash and unique number per invoice. (Ex. 51APGC01-01)

    In column A, will be a list of Purchase Order numbers sent by the customer so we can bill. Now, sometimes we get one PO for multiple invoices, (Ex. 03, 05, 06, 07.....)

    What I am looking to do, is when I get these PO's, I enter them in and then I print a report for our billing Dept. The way the output line (cell) will read, is Job Number, then each unique number: (51APGC01-03, 05, 06, 07)

    There are multiple jobs and each one has it's own report, so the job number will be dynamic and defined else where in the workbook. I can define that. It's just getting the numbers after the "-" and putting them in only.

    That make sense? Thanks!!!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Copy only part of a cells contents based on a condition...

    Hi,

    See the attached workbook.
    I used a macro to generate the codes...
    Attached Files Attached Files
    Regards,
    Rudi

  3. #3
    Registered User
    Join Date
    09-27-2007
    Location
    Staten Island, NY
    MS-Off Ver
    Office 2013
    Posts
    64

    Re: Copy only part of a cells contents based on a condition...

    Quote Originally Posted by RudiS View Post
    Hi,

    See the attached workbook.
    I used a macro to generate the codes...
    Great! Last question, how do I make this execute automatically when the users selects from the drop down menu?

  4. #4
    Registered User
    Join Date
    09-27-2007
    Location
    Staten Island, NY
    MS-Off Ver
    Office 2013
    Posts
    64

    Re: Copy only part of a cells contents based on a condition...

    Quote Originally Posted by RudiS View Post
    Hi,

    See the attached workbook.
    I used a macro to generate the codes...
    Great! Last question, how do I make this execute automatically when the users selects from the drop down menu?

  5. #5
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Copy only part of a cells contents based on a condition...

    I moved the code to the Workbook_Change event.
    This should do it...
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    09-27-2007
    Location
    Staten Island, NY
    MS-Off Ver
    Office 2013
    Posts
    64

    Re: Copy only part of a cells contents based on a condition...

    Perfect! Thanks again RudiS!

+ 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. Move contents of cells based on condition
    By JR001 in forum Excel General
    Replies: 7
    Last Post: 09-13-2013, 07:35 AM
  2. need to copy some cells contents to a another worksheet based on a value condition
    By Mochmoch in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-19-2013, 10:39 AM
  3. Macro to copy the contents of a cell based on certain condition
    By Newbiee in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 11-09-2009, 01:29 AM
  4. Replies: 3
    Last Post: 06-10-2008, 09:20 AM
  5. Counting - based on part of a cells contents
    By Paul Sheppard in forum Excel General
    Replies: 2
    Last Post: 09-17-2007, 11:35 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