+ Reply to Thread
Results 1 to 26 of 26

Data Validation Issue and Data Manipulation of Delimited Data on a Cell

  1. #1
    Registered User
    Join Date
    01-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    25

    Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    Hi Guys,

    Greetings and Mabuhay from Philippines!

    I have been having this excel problem in a while, I have been trying to accomplish this for like a month without any success. First, here is my situation; I was tasked to create some sort of Order Report that will directly connect to our MySQL Database. It was like I need to pull out some tables from MySQL and then manipulate the data through Excel. I did some research and successfully connected our database on an Excel worksheet. As you could see on the attached excel file on the MergedAccountsProdOrdersProduct sheet,which is our actual database table that I pulled out from our database. And then, I need to create an Order Report on another sheet which is the Job Order Form sheet. Then here is my problem, I tried different strategies and can’t make this work.

    Problem 1
    My plan is whenever a Job Order Number is selected from the pull down menu (Data Validation), like for example 1202-003, all the data associated on that Reference or Job Order Number will populate on the report like the Date of Order, Client Name, Gender and so and so forth. All needed data will be coming from the MergedAccountsProdOrdersProduct sheet and posted on the Job Order Form Sheet. As you can see, I created a Data Validation on the Job Order Number that the user can select.

    Problem 2
    The data or information needed by the Job Order Form is coming from the JMData column of MergedAccountsProdOrdersProduct sheet. And the data in every cell is in this format:
    Please Login or Register  to view this content.
    I would like to ask some help and guide in how to manipulate this data. For example, once the Job Order Number 1202-003 is selected, the gender should be posted on another cell like when the value from that cell is "s_Step1":"2”, the gender should be “Male” and if the value is "s_Step1":"1” the gender is “Female”. And then for the Fabric, if the value is "s_Step2":"6", the value should be “Blue”. Please refer to the attached excel file to understand more what I am trying to say.

    I hope that someone could help me on this problem, I will really appreciate it and thanks in advance. Also, if you know similar threads regarding this situation, please don’t hesitate to point me out.
    Attached Files Attached Files
    Last edited by young_padawan_in_exl; 01-11-2013 at 04:05 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    Greetings my young padawan, welcome to the forum and may the excel be with you!

    Taking a look at your file, what you want is easily accomplished. However, there is 1 major hurdle to overcome before we can get you where you need to be. The data you have in column J is pretty much impossible to work with for what you want to do.
    {"s_Step1":"1","s_Step2":"4","s_Step3":"9","s_Step4":"20","s_Step4_s":"1","s_Step5":"22","s_Step5_s":"1","s_Step5_r":"0","s_Step6":"29","s_Step7":"34","s_Step8":"31","s_Step8_s":"3","s_Step8_r":"2","s_Step9":"37","s_Step9_s":"3","s_Step9_r":"2","s_Step10":"38","s_Step10_s":"3","s_Step10_z":"2","s_Step10_r":"2","s_Step11":"41","s_Step11_s":"1","s_Step11_z":"2","s_Step11_r":"3","s_Step12":"43","s_Step12_s":"1","s_Step12_z":"2","s_Step12_r":"3","s_Step13":"44","s_Step13_s":"3","s_Step13_z":"1","s_Step13_r":"2","s_Step14":"47","s_Step14_s":"3"}
    when you do the download, can you at least try and break that down into all of the different steps?. if you can do that, we can use a vlookup, into a table that "explains" all of the codes, and then use index/match to extract the data

    for instance...
    =INDEX(MergedAccountsProdOrdersProduct!$B$2:$AH$15,MATCH('Job Order Form'!D2,MergedAccountsProdOrdersProduct!T2:T15,0),26)
    this will extract the client name

    But for most of what you want, you will need to find some way to break up the info in J (and K, for that matter)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    Quote Originally Posted by FDibbins View Post
    Greetings my young padawan, welcome to the forum and may the excel be with you!

    Taking a look at your file, what you want is easily accomplished. However, there is 1 major hurdle to overcome before we can get you where you need to be. The data you have in column J is pretty much impossible to work with for what you want to do.
    {"s_Step1":"1","s_Step2":"4","s_Step3":"9","s_Step4":"20","s_Step4_s":"1","s_Step5":"22","s_Step5_s":"1","s_Step5_r":"0","s_Step6":"29","s_Step7":"34","s_Step8":"31","s_Step8_s":"3","s_Step8_r":"2","s_Step9":"37","s_Step9_s":"3","s_Step9_r":"2","s_Step10":"38","s_Step10_s":"3","s_Step10_z":"2","s_Step10_r":"2","s_Step11":"41","s_Step11_s":"1","s_Step11_z":"2","s_Step11_r":"3","s_Step12":"43","s_Step12_s":"1","s_Step12_z":"2","s_Step12_r":"3","s_Step13":"44","s_Step13_s":"3","s_Step13_z":"1","s_Step13_r":"2","s_Step14":"47","s_Step14_s":"3"}
    when you do the download, can you at least try and break that down into all of the different steps?. if you can do that, we can use a vlookup, into a table that "explains" all of the codes, and then use index/match to extract the data

    for instance...
    =INDEX(MergedAccountsProdOrdersProduct!$B$2:$AH$15,MATCH('Job Order Form'!D2,MergedAccountsProdOrdersProduct!T2:T15,0),26)
    this will extract the client name

    But for most of what you want, you will need to find some way to break up the info in J (and K, for that matter)
    I am very thankful for your response, Master Jedi. Regarding the part when you said "when you do the download, can you at least try and break that down into all of the different steps?", do you mean, separating the steps into different columns, right? Super Thanks!

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    yes my young apprentice, that is exactly what I meant

    (the excel is strong in this 1)

  5. #5
    Registered User
    Join Date
    01-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    Thank you for showing me the excel force, I will try to delimit or separate the steps during download from the database then I hope that I can still go back to you, Master. I am also thinking of creating a way to delimit the steps into different columns within the actual excel file.

  6. #6
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    @ Both,
    LOL
    (Given with love )
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    lol thanks dred

    @ padawan, I tried a text-to-columns (using , as a seperator) in the data, it seems to work, but as I am unfamiliar with what it should look like, maybe try it yourself and see how it goes?

  8. #8
    Registered User
    Join Date
    01-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    Master, you are correct, we are using "," as the data separator, regarding what it should look like, we could try any temporary data like for "s_Step4_s":"1" = Black or anything, is this what you mean? And then I will be the one to fill up the correct data later on. I am now browsing/researching text-to-columns but if it is fine with you, may I feel the force how did you do it? May the force be with you, master.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    I used "delimited", and then used , in "other"

  10. #10
    Registered User
    Join Date
    01-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    I tried it on the column J or on the steps. The problem is that it overwritten the other columns or data on its right part. And also, Whenever I refresh the Data to get new update or new data from the database, It is returning to its original table alignment and data presentation, the Text-to-columns only last during execution but it is not flexible or static to separate the steps into different columns.

  11. #11
    Registered User
    Join Date
    01-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    Quote Originally Posted by FDibbins View Post
    there is 1 major hurdle to overcome before we can get you where you need to be. The data you have in column J is pretty much impossible to work with for what you want to do.
    {"s_Step1":"1","s_Step2":"4","s_Step3":"9","s_Step4":"20","s_Step4_s":"1","s_Step5":"22","s_Step5_s":"1","s_Step5_r":"0","s_Step6":"29","s_Step7":"34","s_Step8":"31","s_Step8_s":"3","s_Step8_r":"2","s_Step9":"37","s_Step9_s":"3","s_Step9_r":"2","s_Step10":"38","s_Step10_s":"3","s_Step10_z":"2","s_Step10_r":"2","s_Step11":"41","s_Step11_s":"1","s_Step11_z":"2","s_Step11_r":"3","s_Step12":"43","s_Step12_s":"1","s_Step12_z":"2","s_Step12_r":"3","s_Step13":"44","s_Step13_s":"3","s_Step13_z":"1","s_Step13_r":"2","s_Step14":"47","s_Step14_s":"3"}
    when you do the download, can you at least try and break that down into all of the different steps?. if you can do that, we can use a vlookup, into a table that "explains" all of the codes, and then use index/match to extract the data
    )
    Master, after almost 5 hours of balancing the force, I have managed to follow your advise to distribute the column J to different columns. Please see the new attachment on this post for my new workbook. Like what you have told me, I screened the column during the downloading of the data from the database. Now I am back on my problem 1 and problem 2. Please guide me master on how I can trigger the data validation that whenever a Job Order Number is selected, it will populate the whole Job Order Report with the right data from the columns of another sheet. Thanks
    Attached Files Attached Files

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    ok, thats a good start.

    Now, I assume that each of those codes represent something. You will need to create a table that shows all the codes, and what they represent
    when the value from that cell is "s_Step1":"2”, the gender should be “Male” and if the value is "s_Step1":"1” the gender is “Female”

  13. #13
    Registered User
    Join Date
    01-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    Quote Originally Posted by FDibbins View Post
    ok, thats a good start.

    Now, I assume that each of those codes represent something. You will need to create a table that shows all the codes, and what they represent
    Hi Sir,

    I followed your advice, please refer to the attachment for my updated report. I created a new sheet named "Table" for the corresponding value of distributed column or for the "codes represent something". I already included your input regarding the client name which is "=INDEX(MergedAccountsProdOrdersProduct!$B$2:$AH$15,MATCH('Job Order Form'!D2,MergedAccountsProdOrdersProduct!T2:T15,0),26)" and also already modified it for the date. My data validation is now functioning for the date and client name. My only issue remaining is the Problem 2. Thank you and I am hoping for another guide regarding this.
    Attached Files Attached Files

  14. #14
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    see the attached, my questions are on sheet2
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    01-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    Quote Originally Posted by FDibbins View Post
    see the attached, my questions are on sheet2
    Hi Sir, Please refer below for my answers to your questions:

    1st problem - from the yellow list above, how would you identify which item
    goes into which cell in the blue table? Remember, on sheet1, all you have
    is 17+ columns of random info. Excel needs to be able to decide what goes where


    Answer:
    Hi again, sir. I am depending on the Table that I created. Like for example, if the value from the yellow list is "s_Step1":"1", it should go on the Gender. And then before being displayed on the Gender, it should also already be tested or conditioned if what is the equivalent value, if it is "Male" or "Female" - in this example, the equivalent value of "s_Step1":"1" is Female. Same with the Fabric, if the value is "s_Step3":"13", it should be "stretch medium". Please take note of the changes on the value of number preceding the word "Step". If it is Step1 it is for the Gender, if it is Step3, it is for Fabric and so on. Please refer on the attachment for the theory that I am trying to imply here. As you could see, the Data Validation is working fine, and it is also already displaying the correct values on the blue table or on the Gender, Fabric, Shape (Cut) and Wash Type - my only problem is that I don't know how to convert the raw value from the column. I again used your formula for the INDEX here. That is actually almost the same output that I am targeting, the only problem is that it is not yet converted to equivalent which is much readable for the user.

    2nd. What about the data in yellow that does not exist in your "equivalent" table?
    Answer:
    I will also need those data in yellow that does not exist in my equivalent. What I am doing is actually a huge report and as soon as I found out how to convert the values, I am going to continue this on a much larger scale. The file that I am sending you and uploading here from time to time is just an example or part of the report. I will continue it myself once that I found out the conversion. Maybe for now, I will just put a value "Not Yet Available" or something like that.

    Thanks, again, sir.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    01-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    Hi Sir FDibbins, did I my post above answer your question? Thanks.

  17. #17
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    Hi, kindly see my attachment to see if it meets your requirement.
    I think no need the helper columns for J column.
    Note: I rename the name of 1st sheet, it is so complicated. You can rename it again if you want!
    Attached Files Attached Files
    Quang PT

  18. #18
    Registered User
    Join Date
    01-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    Quote Originally Posted by bebo021999 View Post
    Hi, kindly see my attachment to see if it meets your requirement.
    I think no need the helper columns for J column.
    Note: I rename the name of 1st sheet, it is so complicated. You can rename it again if you want!
    Thanks, sir! But may I know why did I lost my data validation for the Job Order Number? I am referring on the pull down menu whenever you select a Job Order Number like for example: 1209-009. I tried creating another Data Validation by accessing sheet A with column T but I can no longer access it or even refer to it. Thank you so much, sir.
    Last edited by young_padawan_in_exl; 01-10-2013 at 11:42 AM.

  19. #19
    Registered User
    Join Date
    01-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    Sir bebo021999, I have already managed to make everything work. thanks for your help and of master jedi. I will post my finished report here once done.

  20. #20
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    Nice to hear that, any rasing query pls feel free to discuss here

  21. #21
    Registered User
    Join Date
    01-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    Quote Originally Posted by bebo021999 View Post
    Nice to hear that, any rasing query pls feel free to discuss here
    Hi Sir,

    I am attending this project again. Sorry sir but after almost a day of debugging and understanding your code, I really can't seem to get how you compare the data from table "A" to "Table". When being accessed on the Job Order Form, they have the same code of:
    Please Login or Register  to view this content.
    yet they are returning a different value from table "Table". May you please help me with this to further understand how you coded this. I also checked the Macros but there is no other code. Even the vb, I also already checked it but you did not put any other codes aside from the formula above. Hoping for your help and response, sir. Thanks.

    Is there any way sir to simplify this code because the data that I posted here is just the draft and I need to edit the whole document and add some more tables. My main problem is that whenever I add another table and copy the code above, it is no longer working and I don't know why after doing a lot of trial and error.
    Last edited by young_padawan_in_exl; 02-11-2013 at 06:08 AM.

  22. #22
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    Nice to see you again.
    In table sheet: Gender,Fabric, Shape, Wash is in different ranges. Our goal is, in Job Order form, if row is,i.e, Gender, the reference range should be Table!$B$5:$B$7,...the same to others Fabric,Shape,...
    Therefore, point the cursor in D7, Ctrl-F3 to set a defined name:
    Name: Table
    Refer to:
    =IF('Job Order Form'!$C7="Gender",Table!$B$5:$B$7,IF('Job Order Form'!$C7="Fabric",Table!$E$5:$E$17,IF('Job Order Form'!$C7="Shape (Cut)",Table!$H$5:$H$9,Table!$K$5:$K$9)))

    Now we search each of Gender in sheet A, column J to check if any item in Gender exist in J:
    SEARCH(Table,INDEX(A!$J:$J,MATCH($D$2,A!$T:$T,0)))
    If exist, gives row number:
    IF(ISNUMBER(SEARCH(Table,INDEX(A!$J:$J,MATCH($D$2,A!$T:$T,0)))),ROW(INDIRECT("1:"&ROWS(Table))),"")
    Using MIN to get the smallest row number:
    MIN(IF(ISNUMBER(SEARCH(Table,INDEX(A!$J:$J,MATCH($D$2,A!$T:$T,0)))),ROW(INDIRECT("1:"&ROWS(Table))),""))\
    In name table, we get Steps.
    With OFFSET(Table,,1,) we get equivalent list.
    Using INDEX with MIN to get the equivalent:
    INDEX(OFFSET(Table,,1,),MIN(IF(ISNUMBER(SEARCH(Table,INDEX(A!$J:$J,MATCH($D$2,A!$T:$T,0)))),ROW(INDIRECT("1:"&ROWS(Table))),"")))
    This is the main part of the formula.
    The other part is error trap to give blank if data exceed.
    Hope this is clear for you. Sorry for my English.

  23. #23
    Registered User
    Join Date
    01-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    ^sir, thanks. it is now working again. the part that I missed was the CTRL-f3, I did not expect that I also need to do that. THANKS, AGAIN!

  24. #24
    Registered User
    Join Date
    01-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    Hi Sir,

    I am kind of having trouble again with this excel task that I have. My first request doesn't involve two results (two columns) for every referral or query on the index like for example if it is 1302-004, there should be an internal reference to be displayed to the cell beside gender which is women. This time, I need to display to data whenever 1302-004 is being INDEX which is the supplier reference. For example for women, it should be also women but on some other categories it is different.
    My problem is that I can’t manage to change your formula to show data on both Internal Reference and Supplier Reference of the Job Order Form sheet whenever 1302-004 is INDEX or selected from the pull down menu.

    I also already created a table of values on the Table sheet.

    I will appreciate your help again regarding this matter, please refer on the attachment for the half completed excel file.

    Thanks.
    Attached Files Attached Files

  25. #25
    Registered User
    Join Date
    01-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    Hi Guys,

    Maybe you could help with my new problem. It's very simple but I don't know why it is not working. I just need to shift the validation of cell c5 (Job Order Form sheet) to column BG of sheet "A". It should be simple but whenever I change it, the validation no longer works. You can still see the JEA-XXX but it can no longer select the right data from sheet "A". I have been fixing this for a week, I hope you guys could help me. Thanks in advanced.

    Please see attachment for the actual excel file.
    Attached Files Attached Files

  26. #26
    Registered User
    Join Date
    01-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Data Validation Issue and Data Manipulation of Delimited Data on a Cell

    ^I will really appreciate any help regarding my problem. Thanks, guys

+ 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