asked on # How do I change this IF(AND(OR formula so that if the cell above has no value then do nothing?

This is my current formula (the calculation works fine):

=IFERROR(IF(AND(OR($M$4="volt";$M$4="auto");Q33<>0);Q33-$F$26;Q33+$F$26);"")

But I want that if Q33 has no value (but there is a formula in it), then do nothing. What do I need to change in my code to achieve that?

=IFERROR(IF(AND(OR($M$4="v

But I want that if Q33 has no value (but there is a formula in it), then do nothing. What do I need to change in my code to achieve that?

Microsoft ExcelMicrosoft Office

View this solution by signing up for a free trial.

Members can start a 7-Day free trial and enjoy unlimited access to the platform.

Ramin, thanks, I tried your solution and it worked!

Probably your solution would have worked also Saqib.

Probably your solution would have worked also Saqib.

I'm glad I could help.

Thanks,

The accepted formula cannot check "**There is a formula**" in it...unless that was not a requirement.

You can use this udf

Function hasfrmla(x As Range) As Boolean

If x.hasformula Then hasfrmla = True

End Function

and the formula

=if(hasfrmla(q33),"",IFERR