+ Reply to Thread
Results 1 to 1 of 1

Coding based on table data (multiple ranges)

Hybrid View

  1. #1
    Registered User
    Join Date
    04-20-2011
    Location
    Richland, WA
    MS-Off Ver
    Excel 2003/2007
    Posts
    31

    Coding based on table data (multiple ranges)

    I work with a lot of analytical sampling data and have to put together characterization documents. The worst case data is extracted and put into a summary type form based on the CAS number (chemical abstract number). Most though not all CAS numbers have published LD50 numbers by Species (animal). The LD50 and Species determine the Tox Code. I've got most of the extraction worked out but am having difficulty writing a UDF to detemine the Tox Code in vba.

    The idea would be to pass the LD50 and Species to the function and spit out the letter (X, A, B, etc). Ultimately a SUMIF will be used to subtotal the different categories to pass to another form. I've included a workbook with three sheets -- one the table that determines Tox Code (reproduced from regulation), Calc sheet (where automated and manual entries meet), and a validation table (basic database of look-up values).

    Open to suggestions. I originally tried nesting and if clause in a select case but the performance was less than stellar. I would like the Tox Code to populate only if there is a published LD50 and Species (i.e. present in look-up). None and not-listed in the LD50 show none or non-listed.
    Attached Files Attached Files

+ 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