+ Reply to Thread
Results 1 to 16 of 16

Trying to automate conditional data entry from one worksheet to another

  1. #1
    Registered User
    Join Date
    02-13-2019
    Location
    Missouri
    MS-Off Ver
    Pro Plus 2013
    Posts
    8

    Trying to automate conditional data entry from one worksheet to another

    First post.... hello everyone!

    I 'm trying to figure out how to automate conditional data entry from one worksheet to another.
    I need to automatically fill data from one worksheet to another
    One sheet only has 3 columns of data Value Stream, Major, total labor pay that I care about. (I actually make a pivot table from it if that matters)
    the other has 3 columns that need to match up Value stream, program name, and rework.
    The data from "value stream" needs to match on both worksheets plus the data in "major" needs to partially match the data in "program name" (multiple programs in one cell)
    THEN, if the about data lines up, I need the value from "total pay" to automatically input into "Rework".
    This is way beyond my limited knowledge of macros and I suspect there will be some VB coding.
    Can anyone help me? This has been taking me many hours and I know it can be much faster...
    Attached Images Attached Images

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Trying to automate conditional data entry from one worksheet to another

    Because of the duplicate values in Value Stream and due to the fact that you have "blacked" out the data under Major and Program Name, it makes it difficult to see possible match ups. For example, You have 2 occurrences of "MPS" under Value Stream in the bottom sheet. Can the matches for each "Major" data to the right of these values be found in more than one row of Program Name? Also, we can't see any column letters or row numbers. It would be easier to help and test possible solutions if you could replace any confidential data with generic data and attach a copy of your file.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    02-13-2019
    Location
    Missouri
    MS-Off Ver
    Pro Plus 2013
    Posts
    8

    Re: Trying to automate conditional data entry from one worksheet to another

    Ok sorry. Basically, I need to fill data from total labor pay into the appropriate rework$ cell based on customer and program. The data varies and not all values get filled every time. Hopefully, my example spreadsheet attachement helps.

    Edit: CAS and MPS both get reported into MPS. Also, B2 value stream should have an entry I accidentally left it out.
    Attached Files Attached Files
    Last edited by mikeecoon; 02-13-2019 at 02:50 PM.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Trying to automate conditional data entry from one worksheet to another

    What do you mean by:
    CAS and MPS both get reported into MPS

  5. #5
    Registered User
    Join Date
    02-13-2019
    Location
    Missouri
    MS-Off Ver
    Pro Plus 2013
    Posts
    8

    Re: Trying to automate conditional data entry from one worksheet to another

    There are 3 value streams. CAS no longer exist and was combined into MPS but for some reason our system still reports CAS separately in the rework sheet. So I want to take the value in total labor pay and copy it to the other sheet into the rework$ cell but value stream and minor have to match value stream and program name in the other sheet. I end up with a pretty large spreadsheet and I am having to search and enter each one manually which takes a lot of time with risk of typos. I just know there has to be a better way.

    Edit: at the very least I'd like someone to point me into the right direction so I can research better. Google hasn't helped me much.

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Trying to automate conditional data entry from one worksheet to another

    It appears that all the values in column C (Major) are unique values. This macro is based on that assumption. If this is not the case, please let me know.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-13-2019
    Location
    Missouri
    MS-Off Ver
    Pro Plus 2013
    Posts
    8

    Re: Trying to automate conditional data entry from one worksheet to another

    Getting close...Thank you. Yes Column C should always be unique. I'm noticing the multiple values that go into the same cell are getting overwritten verses being added together. For example Customer1 has values for abc and edf. Those two should be added together. Instead its just displaying the value for edf (probably because the code found it last). Also, for some reason customer3 has 0.00. There should be something in there. I can't tell why it's not picking it up. I see the logic but this coding is a little more that I fully grasp at the moment.

  8. #8
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Trying to automate conditional data entry from one worksheet to another

    Try:
    Please Login or Register  to view this content.
    Before running the macro, the "c1 " in the Major column has a trailing space at the end. Delete that extra space. Also, customer 4 and customer 6 data is missing a trailing bracket at the end. Please put in that missing bracket. Please check all your data for this kind of typo.
    Last edited by Mumps1; 02-14-2019 at 01:54 PM.

  9. #9
    Registered User
    Join Date
    02-13-2019
    Location
    Missouri
    MS-Off Ver
    Pro Plus 2013
    Posts
    8

    Re: Trying to automate conditional data entry from one worksheet to another

    Holy heck! I think you have done it! Hopefully it goes smoothly on next weeks report but from what I've seen just testing it out this will do nicely. Thanks so much.

  10. #10
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Trying to automate conditional data entry from one worksheet to another

    You are very welcome.

  11. #11
    Registered User
    Join Date
    02-13-2019
    Location
    Missouri
    MS-Off Ver
    Pro Plus 2013
    Posts
    8

    Re: Trying to automate conditional data entry from one worksheet to another

    Actually, the numbers aren't coming out right. I think it's because the real thing is a little more complex. Maybe I could try to upload something closer to the real thing at a later date? It's very close to what I need though.

  12. #12
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Trying to automate conditional data entry from one worksheet to another

    OK. Post an updated copy of the file to this same thread and I will have a look.

  13. #13
    Registered User
    Join Date
    02-13-2019
    Location
    Missouri
    MS-Off Ver
    Pro Plus 2013
    Posts
    8

    Re: Trying to automate conditional data entry from one worksheet to another

    Here's a better sample of what I'm dealing with. I need to do the same for scrap and rework. For some reason it's not adding up right.
    Last edited by mikeecoon; 02-15-2019 at 01:26 PM.

  14. #14
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Trying to automate conditional data entry from one worksheet to another

    After looking at your new data, I don't think it will be possible to do what you want. VBA relies on patterns. The pattern my macro used was the use of one set of brackets and the values between the brackets being separated by commas. Some of your new data has 2 sets of brackets and sometimes one of the brackets is missing. If I searched for the Major value of "DFAS" from Rework and "H1" from Scrap, this Program Name: "Bell Helic (H1, DFASH1, BELLH1, BH1RWK" would be a problem as "DFASH1" contains both values that are being searched. This name: "Boeing (TX, St. Louis BDI,)(MD-10, MD10, B717, BLI-2, BLI-3, BoeingBLI)" has a comma to the right of "BDI". These may seem trivial but any deviation from a set pattern will create problems. I really don't know of a way around this.

  15. #15
    Registered User
    Join Date
    02-13-2019
    Location
    Missouri
    MS-Off Ver
    Pro Plus 2013
    Posts
    8

    Re: Trying to automate conditional data entry from one worksheet to another

    Oh well. Worth a shot. I truly appreciate you trying so hard. I suspected the issues you mentioned might be the problem and I was beginning to think the format needs changing to get this to work.

  16. #16
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Trying to automate conditional data entry from one worksheet to another

    If you can change the format somehow to be consistent, post back with a copy of the file. Good luck with it.

+ 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. Automate Data Entry with array or Macro
    By tsdpurdue in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-01-2017, 04:05 PM
  2. Looking For Alternatives to VBA/Maccro to AUTOMATE Data Entry
    By 777merlin777 in forum Excel General
    Replies: 21
    Last Post: 04-26-2017, 10:13 AM
  3. Trying to automate data entry into one workbook from multiple workbooks
    By gej2017 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-20-2017, 07:33 AM
  4. Replies: 3
    Last Post: 06-15-2009, 03:44 PM
  5. Replies: 1
    Last Post: 06-14-2009, 05:35 PM
  6. Automate data entry from single cell reference!
    By Spellbound in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-11-2009, 08:36 AM
  7. automate data entry by linking data
    By jcavigli in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-18-2008, 01:48 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