+ Reply to Thread
Results 1 to 31 of 31

Copying over specific values when a specific value is entered.

  1. #1
    Registered User
    Join Date
    12-10-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    26

    Question Copying over specific values when a specific value is entered.

    Hello all,

    Have a 4 sheet work book.

    on Sheet 1 there are rows of data, as each row is populated is recieves a specific ID number. Now, what I need to do is on sheet 4 when you enter a ID number, I want specifc fields to populate with specific data from sheet 1.

    Thank you for any help, if you require any more information please let me know.

  2. #2
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Copying over specific values when a specific value is entered.

    May be the INDEX & MATCH.

    INDEX & MATCH

  3. #3
    Registered User
    Join Date
    12-10-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Copying over specific values when a specific value is entered.

    Thanks, I'll look into this and report back..

    Ok, here is something I overlooked when I posted my question, in my project sheet 1 will continually grow with information. In the example provide it is a finite table. Will this still work or would a vlookup be better?, the unique ID is always in A4 to A??

    Does this help further?
    Last edited by jampy00; 12-10-2012 at 11:26 AM. Reason: added info

  4. #4
    Registered User
    Join Date
    12-10-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Copying over specific values when a specific value is entered.

    I've attached the sheet to hopefully shed some light on this issue I am having.

    So here is my layout:

    When you open you will see a user form, this populates sheet 2, sheet 1 then copies over some of the values and adds a unique ID (CCR. Sheet 4 is for follow up, what I need it to enter the unique ID (CCR or select from a drop down the unique ID number (CCR ( these numbers will continue to grow )onto sheet 4 cell B4 from this I need it to pull the correct information from sheet 1 and auto populate the rest of the "bolded" fileds B3 & B5-B11

    I hope this helps, many thanks !!
    Attached Files Attached Files

  5. #5
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: Copying over specific values when a specific value is entered.

    is this what you are looking for here?
    CCR2a1a.xlsm

  6. #6
    Registered User
    Join Date
    12-10-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Copying over specific values when a specific value is entered.

    Perfect! Now will this work when sheet 1 contains 1000's of lines of data, or was the formula built around the 2 lines currently on sheet 1?

    But many thanks for your help so far, this is wonderful !!

  7. #7
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: Copying over specific values when a specific value is entered.

    CCR2a1a.xlsm
    This one will work for 2500 lines...
    all you need to do is up the 2500 in
    =IF(B4="","",VLOOKUP(B4,Sheet1!A4:K2499,3,))
    To whatever you need...

  8. #8
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: Copying over specific values when a specific value is entered.

    now, what else do you need this to do?

  9. #9
    Registered User
    Join Date
    12-10-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Copying over specific values when a specific value is entered.

    Fantastic, looking at the formula I figured out the same thing ( it's actually starting to make sense )

    I also need the two button I discussed in another post on the forum. all pertaining to sheet 4. If you look for posts from me you'll see a few and they all pertain to this workbook.

    Thanks

  10. #10
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: Copying over specific values when a specific value is entered.

    Can you do me a favour... i dont mind helping, but i am getting a touch confused with all the posts you have...
    Can you do a list of everything you still need help on...?
    Just reply to this post with a list and then i can knock them off one by one...
    Thanks...
    P.S. if i have helped so far, click the star below my name...

  11. #11
    Registered User
    Join Date
    12-10-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Copying over specific values when a specific value is entered.

    Star has been clicked my friend.

    Sorry for the confusion, imagine mine...

    Once again, everything I am asking is based on the same workbook you currently have.

    Here are my two current issues.

    Need two buttons on sheet 4 (each doing two things)

    Button 1 can be call "In Work"
    Needs to save sheet 4 as a new (seperate) workbook using the unique ID typed into cell B4 as the name then clear sheet 4

    Button 2 can be called "Complete"
    Needs to save sheet 4 as a .pdf to a location the user can select, using the unique ID in B4 and then clear sheet 4

    Need to insert a hyperlink into a IF formula

    Looking at sheet 1, you'll see the unique ID is cell A4, this is populated when a value is in the cell B4, the infomation in B4 to K4 is pulledfrom sheet 2. What I require is that the IF formula in A4 contains a hyperlink to the corresponding row in sheet 2, in this case row 3

    And that should tie all my posts together.

    Thanks again..

  12. #12
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: Copying over specific values when a specific value is entered.

    i dont know if hyperlink is the right word...

  13. #13
    Registered User
    Join Date
    12-10-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Copying over specific values when a specific value is entered.

    Quote Originally Posted by Legend Rubber View Post
    i dont know if hyperlink is the right word...
    In every reference I have been looking at it is called hyperlink, even in the formula. My issue is I do not know how to add it to the formula I have..

  14. #14
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: Copying over specific values when a specific value is entered.

    what do you want this "hyperlink" to do on sheet2?

  15. #15
    Registered User
    Join Date
    12-10-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Copying over specific values when a specific value is entered.

    Quote Originally Posted by Legend Rubber View Post
    what do you want this "hyperlink" to do on sheet2?
    Highlight Row 3, or any part of it.

  16. #16
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: Copying over specific values when a specific value is entered.

    I dont know user forms that well... but for your hyperlink problem... can you add soemthing like
    Please Login or Register  to view this content.
    ???
    Attached is the hyperlink manually added...
    CCR2a1a.xlsm

  17. #17
    Registered User
    Join Date
    12-10-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Copying over specific values when a specific value is entered.

    Quote Originally Posted by Legend Rubber View Post
    I dont know user forms that well... but for your hyperlink problem... can you add soemthing like
    Please Login or Register  to view this content.
    ???
    Attached is the hyperlink manually added...
    Attachment 199319
    Ok, well this is starting to go somewhere, it uses a simple rowcount.

    Please Login or Register  to view this content.

  18. #18
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: Copying over specific values when a specific value is entered.

    unfortunately i am not sure exactly how to tie the two together...
    i am sure there is a way to add the hyperlink to the CCR# each time a new one is created... but not sure how...
    I will try a few things...

  19. #19
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: Copying over specific values when a specific value is entered.

    Tell me if this does most of what else you need...
    CCR2a1aComplete.xlsm
    I still can not figure out the Hyperlink...

  20. #20
    Registered User
    Join Date
    12-10-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Copying over specific values when a specific value is entered.

    Yes it does, Many Thanks. Do not worry about the Hyperlink, I have that one solved.

    Questions:

    If I need to change where the file saves, where, how do I do that?

    How can I copy these macro's over to another sheet. The one I uploaded it my test sheet, I have one saved locally as my master.
    Last edited by jampy00; 12-11-2012 at 09:45 AM. Reason: added info

  21. #21
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: Copying over specific values when a specific value is entered.

    To move the macros, just copy and paste the VBA code from Module 2 and Module 3 to Modules in your Master...
    Right now, the file saves where ever the Master is located...
    You will need to have the named range "FOLDER" present for this code to work...
    if you tell me the folder location you want it to save to i can change it for you...

  22. #22
    Registered User
    Join Date
    12-10-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Copying over specific values when a specific value is entered.

    Thank you, I will try to copy them. I like th idea of saving to the master, this excel file will be used by a few people, so I have no real idea at this time where they will put the file.

    Update:

    Ok, I get a error, I now understand what you are asking in regards to the FOLDER, since this will be used by different people, I'll need it to save to a common place on any PC, so how about C:\CCR\ I'll have them create a CCR folder on their C: drives, does this make sense?

    Thanks
    Last edited by jampy00; 12-11-2012 at 10:05 AM. Reason: update

  23. #23
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: Copying over specific values when a specific value is entered.

    Just copy
    Please Login or Register  to view this content.
    to somewhere in the Master workbook and name the range it is located in "FOLDER"... this will always update to whereever the file is located...
    or tell me if you dont think that will work and i will change it to C:\CCR\

  24. #24
    Registered User
    Join Date
    12-10-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Copying over specific values when a specific value is entered.

    Quote Originally Posted by Legend Rubber View Post
    Just copy
    Please Login or Register  to view this content.
    to somewhere in the Master workbook and name the range it is located in "FOLDER"... this will always update to whereever the file is located...
    or tell me if you dont think that will work and i will change it to C:\CCR\
    Still getting a error.

    I have included my master book, please take a look and tell me what I did wrong. You can also see the hyperlink formula on sheet 1

    I do have on last question, how do you take a formula and add it to every cell in the column ?
    Attached Files Attached Files

  25. #25
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: Copying over specific values when a specific value is entered.

    Simple, you just have not named the range of the =LEFT...etc to "FOLDER"
    CCR2a1.xlsm

  26. #26
    Registered User
    Join Date
    12-10-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Copying over specific values when a specific value is entered.

    Thanks for that, I do have another small request. Is there a way then when saving or printing as a .pdf it only saves or prints page one of sheet 4. I do not need the button seen on the .pdf document.

    Thanks

  27. #27
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: Copying over specific values when a specific value is entered.

    CCR2a1.xlsm
    Just add , From:=1, To:=1 at the end of the ExportAsFixedFormat in the PDF Code...

  28. #28
    Registered User
    Join Date
    12-10-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Copying over specific values when a specific value is entered.

    Wonderful, Thank you !!

    All your help has been great with my little project. If this works I have two other forms to convert in a similar manner.

  29. #29
    Registered User
    Join Date
    12-10-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Copying over specific values when a specific value is entered.

    Hey Legend,

    I had to make some small changes to Sheet 4 and now faced with a run time error, could you take a quick look?

    I also have to protect any/all cells that contain formula's. Already done on Sheet 1 pass is 1234, could this have caused the problem?
    Attached Files Attached Files
    Last edited by jampy00; 12-11-2012 at 12:18 PM. Reason: added info

  30. #30
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: Copying over specific values when a specific value is entered.

    You had the "FOLDER" naming the wrong range...
    You neen to name the cell that contains the formula...

    I have done it...
    CCR2a1.xlsm

  31. #31
    Registered User
    Join Date
    12-10-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Copying over specific values when a specific value is entered.

    Dang, I'll never get my head around that !?!

    Thanks so much for the updated file.

+ 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