Why is this formula giving me an error on blanks?

slam

Well-known Member
Joined
Sep 16, 2002
Messages
921
Office Version
  1. 365
  2. 2019
=IF(OR(ISBLANK(B1),ISBLANK(B2),ISBLANK(B3),ISBLANK(B4),ISBLANK(B5),ISBLANK(B6),ISBLANK(B7),ISBLANK(B8)),"",IF(B1="Female",655+(4.35*B2)+(4.7*B3)-(4.7*B4),66+(6.23*B2)+(12.7*B3)-(6.8*B4)))*B8-B6

I want the result to be blank unless there are values in every every cell from B1 to B8, then if there values in each cell, i want the first calculation performed in B1 is "Female" and the second calculation performed if B1 is "Male".

The formula works perfectly when all values are entered. I'm just not having it handle the blanks correctly apparently.

B1 through B8 are a mix of data entry cells, data validation lists, and a couple of formulas.

Anyone know where I'm going wrong?
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Think I just figured it out myself - I had to move the last part of the calculation inside the bracket as follows:

=IF(OR(ISBLANK(B1),ISBLANK(B2),ISBLANK(B3),ISBLANK(B4),ISBLANK(B5),ISBLANK(B6),ISBLANK(B7),ISBLANK(B8)),"",IF(B1="Female",655+(4.35*B2)+(4.7*B3)-(4.7*B4),66+(6.23*B2)+(12.7*B3)-(6.8*B4))*B8-B6)

That right?
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top