-
Change each instance of:
If .Cells(iGender).Value =
to:
If Cells(2,iGender).Value =
Note the missing dot before Cells.
This is because the Male or Female value only occurs in one cell in the entire sheet, not on each row.
Other points, your:
For iRow = 2 To rData.Rows.Count
I think should be:
For iRow = 4 To rData.Rows.Count
You have at least 4 pairs of lines like:
If .Cells(iInheritance).Value = "autosomal dominant" And .Cells(iPopFreqMax).Value <= 0.01 And .Cells(iClinvar).Value = "" And .Cells(iCommon).Value = "" Then .Cells(iClassification).Value = "likely pathogenic"
If .Cells(iInheritance).Value = "autosomal dominant" And .Cells(iPopFreqMax).Value >= 0.01 And .Cells(iClinvar).Value = "" And .Cells(iCommon).Value = "" Then .Cells(iClassification).Value = "likely benign"
where, as it happens with your data where you have values of 0.01 exactly, both lines are true. Normally, one of those statements would not contain the = sign in the comparison. This prevents overlap of values where both conditions end up being true.
So you'd have either:
~(iPopFreqMax).Value < 0.01 And~
~(iPopFreqMax).Value >= 0.01 And~
or:
~(iPopFreqMax).Value <= 0.01 And~
~(iPopFreqMax).Value > 0.01 And~
depending on which category you want exact values of 0.01 to be placed in.
Remember, whichever of these you choose, to make the other comparisons the same, even where you don't have paired lines.
Last edited by p45cal; 05-10-2014 at 02:15 PM.
p45cal
Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules