Results 1 to 3 of 3
  1. #1
    chan069 is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2013
    Posts
    5

    Grouping Data

    Hi All,

    I am soon to have a lot of data (too much for excel) from some simulation work I am completing for university which I then need group based on the formula below. Any help with this would be really appreciated!

    My database is composed of 7 tables, each with identical variables.
    Click image for larger version. 

Name:	DB_Overview.png 
Views:	3 
Size:	80.3 KB 
ID:	11174
    I then need to group all the data into 11 groups (R, BA_DO, BA, BAS, LG, DOS, DOA, DO, MO, HG, SHG) based on the formula below (written for excel) which references values in the table below (the values in the table need to be able to be changed)
    Click image for larger version. 

Name:	Groupings.png 
Views:	2 
Size:	37.0 KB 
ID:	11175
    =IF(AND([Au]>M3,[As]<M4,[K]<M6,[S]<M8),"SHG",
    IF(AND([Au]>L3,[As]<L4,[K]<L6,[S]<L8),"HG",
    IF(AND([Au]>K3,[As]<K4,[K]<K6,[S]<K8),"MO",
    IF(AND([Au]>J3,[As]<J4,[K]<J6,[S]<J8),"DO",


    IF(AND([Au]>I3,[As]<I4,[K]<I6,[S]<I8),"DOA",
    IF(AND([Au]>H3,[As]<H4,[S]<H8),"DOS",
    IF(AND([Au]>G3,[As]<G4,[K]<G6,[S]<G8),"LG",
    IF(AND([Au]>F3,[As]<F4,[K]<F6,[S]<F8),"BAS",
    IF(AND([Au]>E3,[S]<E4),"BA",
    IF(AND([S]>D9),"BA_DO",IF(AND([Au]<C2),"R"
    )))))))))),"NA")

    Following the completion of the groupings I then need to display the resultant data in a summary table as per below.
    Click image for larger version. 

Name:	display table.png 
Views:	1 
Size:	3.4 KB 
ID:	11176

    Any help would be welcomed!

    Cheers.

  2. #2
    chan069 is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2013
    Posts
    5

    Iff, and

    Or alternatively would anybody be able to assist in the rewriting of this If statement for access?

    ''=IF(AND([Au]>0.95,[As]<1.0,[K]<1.0,[S]<0.1),"SHG",
    IF(AND([Au]>0.85,[As]<0.8,[K]<0.95,[S]<0.2),"HG",
    IF(AND([Au]>0.75,[As]<0.7,[K]<0.90,[S]<0.3),"MO",
    IF(AND([Au]>0.65,[As]<0.6,[K]<0.85,[S]<0.4),"DO",
    IF(AND([Au]>0.55,[As]<0.5,[K]<0.80,[S]<0.5),"DOA",
    IF(AND([Au]>0.45,[As]<0.4,[S]<0.60),"DOS",
    IF(AND([Au]>0.35,[As]<0.3,[K]<0.70,[S]<0.7),"LG",
    IF(AND([Au]>0.25,[As]<1.0,[K]<0.65,[S]<0.8),"BAS",
    IF(AND([Au]>0.15,[S]<0.90),"BA",
    IF(AND([S]>0.95),"BA_DO",
    IF(AND([Au]<0.05),"R"
    )))))))))),"NA")

  3. #3
    chan069 is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2013
    Posts
    5
    I have managed to write a formula which groups all my data, however when every I wish to make any changes to definitions which control the groupings I have to complete this within the Query editor. Is there away where I can reference the numerical values (the <> values) in a table? And then alter these values by utilizing a form.

    switch([Au]>0.95 AND[As]<1.0 AND[K]<1.0 AND[S]<0.1,"SHG",
    [Au]>0.85 AND[As]<0.8 AND[K]<0.95 AND[S]<0.2,"HG",
    [Au]>0.75 AND[As]<0.7 AND[K]<0.90 AND[S]<0.3,"MO",
    [Au]>0.65 AND[As]<0.6 AND[K]<0.85 AND[S]<0.4,"DO",
    [Au]>0.55 AND[As]<0.5 AND[K]<0.80 AND[S]<0.5,"DOA",
    [Au]>0.45 AND[As]<0.4 AND[S]<0.60,"DOS",
    [Au]>0.35 AND[As]<0.3 AND[K]<0.70 AND[S]<0.7,"LG",
    [Au]>0.25 AND[As]<1.0 AND[K]<0.65 AND[S]<0.8,"BAS",
    [Au]>0.15 AND[S]<0.90,"BA",
    [S]>0.95,"BA_DO",
    [Au]<0.05,"R")

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Grouping
    By greg2725d in forum Reports
    Replies: 7
    Last Post: 09-29-2011, 10:00 AM
  2. Grouping of data
    By tkandy in forum Queries
    Replies: 7
    Last Post: 05-09-2011, 06:07 PM
  3. Grouping By Age
    By xnixiel in forum Queries
    Replies: 1
    Last Post: 07-01-2010, 09:14 AM
  4. Grouping
    By dref in forum Reports
    Replies: 1
    Last Post: 01-16-2010, 08:30 AM
  5. Grouping data in Report
    By Leelers in forum Reports
    Replies: 1
    Last Post: 02-20-2009, 08:49 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums