+ Reply to Thread
Results 1 to 18 of 18

picking data from one list to populate another

  1. #1
    Registered User
    Join Date
    08-07-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    11

    picking data from one list to populate another

    I want to have one sheet dedicated to reading a CSV form. Want i want from that is that, on other pages, there will be a list that reads the data from that first sheet to populate itself, but only if a certain criteria is met (based on the tag in the first column of the master list).

    Therefore, each time the mast list is refreshed from the CSV (new entries made vertically), the lists on the other pages will go through that master list and recognize that there are new entries, and display those entries that have the proper tag.

    ie, Sheet1=master list. On Sheet2, the list will only entries with the tag "tag-A", and on Sheet3 the list will only contain entries with the tag "tag-B", etc.

    I tried using various combinations of vlookup and IF statements, but i cant seem to figure something out that functions properly. Every time i felt like i got close (albeit with a sometimes cumbersome cleanup process) i realized a glaring fault.

    Any/all help appreciated

    thanks
    dan
    Last edited by mustang__1; 08-09-2012 at 10:01 AM.

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: picking data from one list to populate another

    How is the Master sheet populated? Is the new data added to or create a new list in master sheeet. Meaning when importing does the data get overwriten or does the data get added to the bottom of master sheet. Why not when importing the data add the new data to sheet1 and sheet2.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    08-07-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: picking data from one list to populate another

    New entries are added to the bottom of the master sheet. Im using the master sheet instead of going directly to the individual sheets because i dont know/cant envision doing it any other way. If, when importing to sheet 1 and sheet2, it will only pull the row with the respective tag in the first column, then that would be an easy and workable solution.

    thanks mike


    dan

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: picking data from one list to populate another

    Can you upload the csv file and your master workbook?

  5. #5
    Registered User
    Join Date
    08-07-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: picking data from one list to populate another

    All i am technically working on right now is a proof of concept which i will be implementing in a more complicated workbook, but here is a sample of what the CSV looks like. Sheet1, in this case, would contain something like the following CSV, Sheet2 would be the list of all cash entries, Sheet3 would be all "mas" entries, and so on. As it is right now i manually update each cash entry in the workbook, and each "mas" entry, etc. I am looking to take a master list from a CSV created in my phone for each receipt and upload the updated master list into excel at the end of each week.

    cash vendor A 4.86 USD 8/7/2012
    cash store B 9.92 USD 8/7/2012
    cash random ent 85 USD 8/7/2012
    mas food 35 USD 8/7/2012
    mas parts 225 USD 8/7/2012
    vis vendor B 13.83 USD 8/7/2012

    thanks for the help

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: picking data from one list to populate another

    Are there heading's in the csv file?

    ---------- Post added at 04:49 PM ---------- Previous post was at 04:47 PM ----------

    Also from your example its hard to tell what the fields are. Could you put it into a xl file and upload.

  7. #7
    Registered User
    Join Date
    08-07-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: picking data from one list to populate another

    nope, it shows up in excel just as you see it (with the item descriptions and $$ being the actual amounts).

    thanks


    edit: i added the column labels before uploading, otherwise it will show up without those in actual usage.
    Attached Files Attached Files
    Last edited by mustang__1; 08-08-2012 at 04:56 PM.

  8. #8
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: picking data from one list to populate another

    Also from your example data I dont see Tag A or Tab B

    the list will only entries with the tag "tag-A", and on Sheet3 the list will only contain entries with the tag "tag-B",

  9. #9
    Registered User
    Join Date
    08-07-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: picking data from one list to populate another

    i was being arbitrary in the beginning. here the tag is still in the first column. so, sheet2, for example, would have "cash" only entries, sheet3 "mas" only entries, etc. so, if the row has "cash", it will populate a list on sheet2 each time the CSV is refreshed with more rows.

  10. #10
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: picking data from one list to populate another

    Ok what about vis? Do you need to separate these out too?

  11. #11
    Registered User
    Join Date
    08-07-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: picking data from one list to populate another

    yes, i would need to separate out those too.

  12. #12
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: picking data from one list to populate another

    Dan,

    Without knowing exactly what to due, I put this together. To test, place the attatched csv and TestFile.xlsm file's into the same folder. Everytime you import the csv file it will add the entire csv file to the Main sheet, at the same time it will break out the Cash, Mas, and vis records into there respective worksheet.

    Hope this helps

    Test.zip

  13. #13
    Registered User
    Join Date
    08-07-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: picking data from one list to populate another

    that appears to be making this work properly. I just looked at the macro code, and, wow, way more complicated to pull this off than i had anticipated. id be happy to throw a couple dollars your way via paypal if you want, there's no way i would have been able to write that.

  14. #14
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: picking data from one list to populate another

    @mustang_1,

    If you lived near I might take a beer but anyway dont worry about any money, this site is not setup for coders to make money its to help others.

  15. #15
    Registered User
    Join Date
    08-07-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: picking data from one list to populate another

    maybe not solved afterall, im ending up with duplicates with each click of the button. i created a macro (by recording) to remove duplicates, but that only seems partially effective.

  16. #16
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: picking data from one list to populate another

    @mustang_1

    I assumed that the csv file would be populated with all new records? Is that not the case?

  17. #17
    Registered User
    Join Date
    08-07-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: picking data from one list to populate another

    no, each time i download a new csv from the phone, it will be adding data to the end of the csv in sequential order. However, i could create a new report each cycle and delete the original CSV and import the next one. that would not be that hard to do.

  18. #18
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520
    If you do by deleting the file and creating a new vac file it will work without any modifications. I will be out of town til Saturday.

+ 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