+ Reply to Thread
Results 1 to 12 of 12

Help adding to existing code

  1. #1
    Registered User
    Join Date
    11-17-2010
    Location
    Eau Claire, WI
    MS-Off Ver
    Excel 2003
    Posts
    9

    Help adding to existing code

    Hello,

    I currently have code that will copy certain cells to another worksheet when a certain case is entered in column V. Here's the working code I have right now:

    Please Login or Register  to view this content.
    It turns out that I am going to need 7 columns that have the possibility of having the availabe case's, columns V, W, X, Y, Z, AA, and AB. I need to rewrite this code so that this script will run on all 7 of these columns, but totally seperate instances. For example, if OC01 was triggered in column Z, I need it to do all the copying that is above, except the the first "range" line needs to be for the column that was triggered. Right now the code is exclusive for Column V having the triggers.

    I hope I explained this well enough.

    Thanks!
    Last edited by Jrykiss; 12-02-2010 at 06:11 PM.

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Help adding to existing code

    As per the Forum rules you'll need to put code tags around your code.
    Then you'll get some help.

  3. #3
    Registered User
    Join Date
    11-17-2010
    Location
    Eau Claire, WI
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Help adding to existing code

    thanks for the heads up. The code tags are now around the code. I tried to attach my file as wel, but I keep getting an error.

    Thanks again!

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Help adding to existing code

    Reduce the file size by eliminating sheets/data not pertinent to this issue, or zipping the file.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Help adding to existing code

    Maybe this:
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    11-17-2010
    Location
    Eau Claire, WI
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Help adding to existing code

    Ok, I managed to get the file attached in a zip file. The code I'm working on is for the "Jan. Paid" worksheet. JBeaucaire, the code you supplied is in there right now. It is working for all columns except I still haven't resolved the copying of the trigger code from the respective column to column B on the "Details" sheet.

    Thanks again!
    Attached Files Attached Files

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Help adding to existing code

    Your zip is unreadable.

  8. #8
    Registered User
    Join Date
    11-17-2010
    Location
    Eau Claire, WI
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Help adding to existing code

    got the actual file to upload this time. If that doesn't work, I'm lost
    Attached Files Attached Files

  9. #9
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Help adding to existing code

    It worked for me as is. Shut down your Excel and restart it, just to be sure.

  10. #10
    Registered User
    Join Date
    11-17-2010
    Location
    Eau Claire, WI
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Help adding to existing code

    The issue is when the code is triggered, it is transferring certain information to the "details" page. So, if the code was in column V, then everything is fine. But then if another code needed to associated with that, I would put that in column W. When it creates the entry in the "details" page, I need column B in details to have the same code that triggered the copying of information.

    Does that make sense?

    I've attached some screenshots trying to illustrate what I'm talking about.
    Attached Images Attached Images

  11. #11
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Help adding to existing code

    Probably just change this:
    Please Login or Register  to view this content.

    ....to...
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    11-17-2010
    Location
    Eau Claire, WI
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Help adding to existing code

    Genius!

    That works.

    Thanks so much. You guys are awesome

+ 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