I also posted this to, but not sure if this is where it should be.
http://www.mrexcel.com/forum/excel-q...lications.html
I am having trouble converting a manual formula into VBA:
The formula below worked great when all the values were on one sheet:
Code:
=IF(COUNTIFS( A$2:A$6713,F2,B$2:B$6713,"<="&G2,C$2:C$6713, ">="&G2),VLOOKUP(G2,$B$2:$D$6713,3,1),"No")
Now I am trying to create a VBA with the values on two sheets, below is what I have:
VB
Code:
Const myEpilepsy As String = "=IF(SUMPRODUCT(--(Panel!$B$2:$B$6713=Annovar!$Q$5),--(Panel!$C$2:$C$6713<=Annovar!$R$5),--(Panel!$D$2:$D$6713>Annovar!$R$5)),VLOOKUP(Annovar!$R$5,Panel!$C$2:$E$6713,3,1),""No"")"
Thanks.
Bookmarks