Results 1 to 3 of 3
  1. #1
    Hex92 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    4

    Question How to return mutliple calculations to a single column


    I am working with environmental data and I am trying to calculate corrected recovery data for PCBs.

    Its difficult to describe so I have attached an screenshot of an excel file with data from a query that I built that I thought would get me going in the right direction.

    I want to divide the values in column D (UNCDry) by the appropriate number in columns E-M based on the value in column C.

    So all the UNCDry values with 'tri' (NumChlor- Col C) would be divided by the value in column F.

    Then all the UNCdry values with 'tetra' would be divided by column G...and so on across through deca.

    In the end I need to have a single column with the corrected values just like I do for the UNC data.

    I tried building a different query for each set (tri, tetra, penta, etc), but I couldn't figure out how to then combine all those in a single column of corrected data.


    Thanks
    Attached Thumbnails Attached Thumbnails excelshot.jpg  

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Construct a field in query with an expression. Something like:

    [UncDry] / Switch([NumChlor]="tri",[triPCB], [NumChlor]="tetra",[tetraPCB], ...repeat for remaining columns)
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Hex92 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    4
    THANK YOU!

    I knew there had to be an easy way to do this and that worked perfectly. I spent more time than I care to admit trying to figure out how to do that.

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

Similar Threads

  1. Replies: 6
    Last Post: 01-13-2012, 09:17 AM
  2. return max/min value in single query
    By garamon in forum Access
    Replies: 2
    Last Post: 10-23-2011, 03:50 PM
  3. Replies: 5
    Last Post: 02-09-2011, 11:22 AM
  4. Replies: 7
    Last Post: 10-08-2010, 09:48 AM
  5. Replies: 1
    Last Post: 04-15-2010, 02:07 AM

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