+ Reply to Thread
Results 1 to 29 of 29

this is a hard one... Extracting info from raw data based on list of criterion

  1. #1
    Registered User
    Join Date
    04-02-2014
    Location
    Asia
    MS-Off Ver
    Excel 2010
    Posts
    22

    this is a hard one... Extracting info from raw data based on list of criterion

    Hi Guys,

    I have been cracking my head to get a solution here. Can someone here help me out?

    From the raw data, I need to retrieve the list of IDs based on the following criteria :
    usage >300
    by Country
    frequency of ID in that country (ideally >2)
    by total revenue > 100
    AND
    Determine If ID belongs to group 1 or group 2

    Ive tried using a pivot which gives me some useful data however i cannot sort or manipulate the pivot table with an IF formula to give me only the IDs which belong to Group 1 or Group 2.
    Also since I need fixed template, the pivot doesnt work out so well as the countries in group 1 or 2 might change and I want to be able to do is make the change in the group's list then the template will work out the rest and give me my results.

    Help someone???

    P/S : dont use this attachment, i have uploaded an updated one further below the thread. thanks
    Attached Files Attached Files
    Last edited by xcelnoob77; 04-02-2014 at 11:37 PM.

  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,939

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Hi and welcome to the forum

    what would a sample answer look like, and how would you arrive at that?
    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
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Not perfect, maybe could give you an idea for the results....
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-02-2014
    Location
    Asia
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Hi,

    Glad to have found this forum.. Im really in a fix here.
    prolly confused you too..

    I did up a sample in the working sheet. Hope this helps you see what I am trying to achieve..
    My raw data will be alot more that what I've provided therefore i really need a template which can help me formulate the answer each time I receive new raw data.

    Thanks
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-02-2014
    Location
    Asia
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    hi azumi,

    that was fast! thanks.. i've also uploaded a sample of what I actually want since I realised my post was kinda confusing to me and possibly everyone too..
    Can you look at that too? Thanks.

  6. #6
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Updating file with your situation but still confused with your condition
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-02-2014
    Location
    Asia
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Quote Originally Posted by azumi View Post
    Updating file with your situation but still confused with your condition
    Hi Azumi,

    Thanks for replying.
    Which condition are you confused about?

    Hmm.. the point of it all is to determine which ID should be in Group 1 or Group 2, based on
    their usage in the countries.

    If the ID's usage is in majority (im just loosely saying this) countries belonging to Group 1 AND Usage above 300 AND are above revenue $450 but less than $600 then that ID belongs in Group 1.

    Does this help at all??

  8. #8
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Ok workin on it

  9. #9
    Registered User
    Join Date
    04-02-2014
    Location
    Asia
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Quote Originally Posted by azumi View Post
    Ok workin on it
    thanks
    Hmm.. i've adjusted conditions, perhaps this is better..

    Group 1 = (Count of ID in Group 1 countries> Count of ID in Group 2 countreis, Total Revenue for ID> 450>600, Usage per country> 300, Total Revenue per country >100, Frequency of ID in Country>2)

    Group 2 = (Count of ID in Group 1 countries< Count of ID in Group 2 countreis, Total Revenue for ID>600, Usage per country> 300, Total Revenue per country >100, Frequency of ID in Country>2)

  10. #10
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Quote Originally Posted by xcelnoob77 View Post
    Hi Azumi,

    Thanks for replying.
    Which condition are you confused about?

    Hmm.. the point of it all is to determine which ID should be in Group 1 or Group 2, based on
    their usage in the countries.

    If the ID's usage is in majority (im just loosely saying this) countries belonging to Group 1 AND Usage above 300 AND are above revenue $450 but less than $600 then that ID belongs in Group 1.

    Does this help at all??

    Im used this condition, my head spnning you know hahaha
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    04-02-2014
    Location
    Asia
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Quote Originally Posted by azumi View Post
    Im used this condition, my head spnning you know hahaha
    my head has fallen off my shoulders..

    i think i will need overnight to process this.. will get back to u tomorrow lol... Thanks a million!

  12. #12
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Okay anytime....

    cheers

  13. #13
    Registered User
    Join Date
    04-02-2014
    Location
    Asia
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Quote Originally Posted by azumi View Post
    Okay anytime....

    cheers
    I went back and tried to understand the formulas but I'm not so advanced skilled.
    I can use what you did up for me as a verification, very useful however I have done up another spreadsheet.

    Refer attached working_v2 sheet and tables sheet..

    The examples were manually calculated of course since I dont know how to create formulas for that ;( but thats basically the desired result
    Attached Files Attached Files

  14. #14
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Ok Im tryin again...... be patient

  15. #15
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Im done with highlited cells, please check the file

    Azumi
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    04-02-2014
    Location
    Asia
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Quote Originally Posted by azumi View Post
    Im done with highlited cells, please check the file

    Azumi
    Yes! you're a genius

    Can I ask why do you use TRIM? Thanks.

  17. #17
    Registered User
    Join Date
    04-02-2014
    Location
    Asia
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Quote Originally Posted by xcelnoob77 View Post
    Yes! you're a genius

    Can I ask why do you use TRIM? Thanks.
    i am trying to figure out a formula for column H, but it doesnt work..
    =IF(G2>VLOOKUP(working_v2!I2,tables!M2:O99,3,FALSE),"Yes","No")

  18. #18
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Your data is not clean, there is trailing spaces in your column ID so Im use TRIM to removed them, and get the results...

    So you need to compare G2 with tables sheet?

    =IF(G2>VLOOKUP(I2,tables!$M$3:$N$54,2,FALSE),"Yes","No")
    Last edited by azumi; 04-04-2014 at 01:41 AM.

  19. #19
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Oh yes Im forgot to tell you, Im add up helper column (Column G) in Raw Sheet for Group, for reduce too complicated for formula, because you have separate tables for group

  20. #20
    Registered User
    Join Date
    04-02-2014
    Location
    Asia
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Quote Originally Posted by azumi View Post
    Oh yes Im forgot to tell you, Im add up helper column (Column G) in Raw Sheet for Group, for reduce too complicated for formula, because you have separate tables for group
    Yes, I saw the extra column. thanks...
    i managed to get a formula for working_v2 sheet column H,
    =IF(G2>INDEX(tables!$M$2:$O$132,MATCH($I2,tables!$N$2:$N$132,0),3),"Yes","No")

    it seems to work fine.

    Column I and J, i am trying too and patiently waiting for u

  21. #21
    Registered User
    Join Date
    04-02-2014
    Location
    Asia
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Quote Originally Posted by azumi View Post
    Oh yes Im forgot to tell you, Im add up helper column (Column G) in Raw Sheet for Group, for reduce too complicated for formula, because you have separate tables for group
    Hi Azumi,

    I just realised there is a mistake in the formula on Column E..
    For eg. ID 81637650
    Col E should be India, not Malaysia. Can you check it?

    Also, I cant seem to copy and paste all the formulas into another spreadsheet.. the formula doesnt work anymore..
    See attached..
    Attached Files Attached Files

  22. #22
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Fine Im checking again....

  23. #23
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    In my file its workin......
    Attached Files Attached Files

  24. #24
    Registered User
    Join Date
    04-02-2014
    Location
    Asia
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Hi Azumi,

    Mine doesn't show it corretly.. i wonder why..

    Check out the pic i attached.. 816347650, column E should be India not Malaysia.

    xcelpic.png

  25. #25
    Registered User
    Join Date
    04-02-2014
    Location
    Asia
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Quote Originally Posted by azumi View Post
    In my file its workin......
    Also, Column F does not populate the correct count. For e.g 82866990 Column E is correct but Column F should be 3 instead of 2.

  26. #26
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Add more TRIM to clean your ID criteria........
    Attached Files Attached Files

  27. #27
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    and now try to thinking to choose Group 1 or Group 2 Am I right? maybe tomorrow?

  28. #28
    Registered User
    Join Date
    04-02-2014
    Location
    Asia
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Quote Originally Posted by azumi View Post
    and now try to thinking to choose Group 1 or Group 2 Am I right? maybe tomorrow?
    Sure thing..tomorrow or sunday or monday.. thanks.
    However Col E and F still does not fetch the correct value.. I am trying to correct that..

  29. #29
    Registered User
    Join Date
    04-02-2014
    Location
    Asia
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: this is a hard one... Extracting info from raw data based on list of criterion

    Quote Originally Posted by azumi View Post
    and now try to thinking to choose Group 1 or Group 2 Am I right? maybe tomorrow?
    Hi Azumi,

    I am using a different formula for my column B and C..

    =SUMPRODUCT(IF(FREQUENCY(IFERROR(MATCH(IF($A3=Table1[ID],Table1[Country]),Group1,0),"e"),IFERROR(MATCH(IF($A3=Table1[ID],Table1[Country]),Group1,0),"e")),1,0))

    But it is not tabulating correctly.. do you know how to correct this?

+ 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. Replies: 28
    Last Post: 08-15-2013, 09:38 AM
  2. Autopopulate cell based on info selected in Data Validation list
    By mintymike in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-19-2012, 12:42 AM
  3. Replies: 2
    Last Post: 05-17-2012, 06:33 AM
  4. Extracting conditional based info Vlookup
    By ragavendraph in forum Excel General
    Replies: 5
    Last Post: 02-27-2012, 12:09 PM
  5. Input form with criterion-based selection list
    By TPFKAS in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-27-2009, 05:05 PM

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