View Full Version : Solved: Iserror in VBA setup
klutz
08-09-2009, 12:42 PM
Hello,
How can i set this formula in VBA with the "iserror"?
.Offset(3, -2).FormulaR1C1 = "=LOOKUP(2,1/((R27C7:R" & lngLastRow & "C7=R[-2]C[2])*(R27C28:R" & _
lngLastRow & "C28=R[1]C)),R27C11:R" & lngLastRow & "C11)"
Thanks...
Zack Barresse
08-09-2009, 01:09 PM
Use the Evaluate() method to get the formulas return. You can then check the returned result.
HTH
Bob Phillips
08-09-2009, 01:22 PM
ActiveCell.Offset(3, -2).FormulaR1C1 = _
"=IF(ISERROR(LOOKUP(2,1/((R27C7:R" & lngLastRow & "C7=R[-2]C[2])*(R27C28:R" & _
lngLastRow & "C28=R[1]C)),R27C11:R" & lngLastRow & "C11)),""""," & _
"LOOKUP(2,1/((R27C7:R" & lngLastRow & "C7=R[-2]C[2])*(R27C28:R" & _
lngLastRow & "C28=R[1]C)),R27C11:R" & lngLastRow & "C11))"
klutz
08-09-2009, 01:39 PM
Not even sure how to set it up using your suggestion Zack. :-(. Aint't that keen yet using VBA....
Thankx XLD...i almost had it, something like yours except for some quotation missing...
Gracias...
Zack Barresse
08-10-2009, 10:05 AM
Ah, I thought you meant you wanted to check if it was an error in VBA. Glad you have it working though. :)
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.