+ Reply to Thread
Results 1 to 7 of 7

syntax of formula

  1. #1
    Forum Contributor
    Join Date
    05-09-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2016
    Posts
    543

    syntax of formula

    =IF(OR(AP2="probable-pathogenic",AP2="pathogenic"),"Likely Pathogenic",IF(AP2="unknown","VUS", IF(AND(AO2="common_variation",OR(D2="autosomal dominant",D2="autosomal dominant and autosomal recessive",D2="autosomal recessive and autosomal dominant",D2="autosomal dominant, autosomal recessive",D2="autosomal recessive, autosomal dominant")),AND(AB2<0.01,"Unknown",IF(AND(AB2>0.01,OR(D2="autosomaldominant",D2="autosomal dominant and autosomal recessive",D2="autosomal recessive and autosomal dominant",D2="autosomal dominant, autosomal recessive",D2="autosomal recessive, autosomal dominant")),"Likely Benign", IF(AND(AO2="common_variation",AND(AB2<0.1,D2="autosomal recessive")),"Unknown",IF(AND(AB2>0.1,OR(D2="autosomal recessive")),"Likely Benign",""))))))

    Is the above syntax correct? Thank you.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: syntax of formula

    Hi,

    As it stands no. Entering it to a cell prompts Excel to offer a correction which adds a 7th closing parentheses.

    Whether it's the most efficient way of doing what you want is a moot point. We could only tell if you share the workbook with us, manually adding some results so that we know the end goal.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    05-09-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2016
    Posts
    543

    Re: syntax of formula

    I attached an example of the spreadsheet. Thanks.
    Attached Files Attached Files
    Last edited by cmccabe; 04-10-2014 at 04:11 PM.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: syntax of formula

    Hi,

    Can you explain with narrative text what your rules are. Since there are many similar words it's quite possible this could be simplified either by using wild card characters or perhaps more usefully some VLOOKUP() functions.

  5. #5
    Forum Contributor
    Join Date
    05-09-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2016
    Posts
    543

    Re: syntax of formula

    I hope this helps:

    1. If statement: Probable-pathogenic OR pathogenic in column AP (clinvar_3-3-2014) = likely pathogenic in column AS (classify)
    2. If statement: Unknown in column AP (clinvar_3-3-2014) = VUS in column AS (classify)
    3. IF AND OR statement: If column AO (common_3-3-2014) = common variation AND D2 (Inheritence)= autosomal dominant OR autosomal dominant and autosomal recessive OR autosomal recessive and autosomal dominant OR autosomal dominant, autosomal recessive OR autosomal recessive, autosomal dominant AND AB (PopFreqMax)<0.01 Then AS (Classify) is Unknown
    4. IF AND OR statement: If column AO (common_3-3-2014) = common variation AND D2 (Inheritence)= autosomal dominant OR autosomal dominant and autosomal recessive OR autosomal recessive and autosomal dominant OR autosomal dominant, autosomal recessive OR autosomal recessive, autosomal dominant AND AB (PopFreqMax)>0.01 Then AS (Classify) is Likely Benign
    5. IF AND OR statement: If column AO (common_3-3-2014) = common variation AND AB (PopFreqMax) <0.1 AND column D (Inheritence) is autosomal recessive Then column AS (Classify) = Unknown
    6. IF AND OR statement: If column AO (common_3-3-2014) = common variation AND AB (PopFreqMax) >0.1 AND column D (Inheritence) is autosomal recessive Then column AS (Classify) = Unknown

    There are basically six different checks that are performed for the Classify column. Thank you for your help.

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: syntax of formula

    Putting that together in a simple table (see below) and ignoring the column AP tests don't all the rest boil down to

    If col D contains the word dominant AND col AB <.01
    OR
    If col D contains the word recessive AND AB is Either >0.1 OR < 0.1
    Then return "unknown"

    Anything else return "likely benign"



    Please Login or Register  to view this content.
    Last edited by Richard Buttrey; 04-10-2014 at 07:08 PM.

  7. #7
    Forum Contributor
    Join Date
    05-09-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2016
    Posts
    543

    Re: syntax of formula

    The PopFreq (0.1 or 0.01 values) are not always given and sometime the common variation may be there. So the formula takes that into account. Additionally, lets say the popfreq is <0.01 but is a common variation, the classify should be unknown, but without the common variation check a likely benign would result. I hope this helps. Thanks.

+ 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. Formula syntax {;;;}
    By Ron de Bruin in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 AM
  2. [SOLVED] Formula syntax {;;;}
    By Ron de Bruin in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 06:05 AM
  3. Formula syntax {;;;}
    By Simplefi in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  4. Formula syntax {;;;}
    By Simplefi in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  5. Need Help w/ SUM Formula Syntax
    By BCS in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-18-2005, 10:06 AM

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