1

I want to determine the area of objects in each row. If values for length and width are present, I want to multiply the values to determine the area of the object. However, for circular objects, the length value indicates the diameter, and the width column is left blank. If there is a value in the length column, but not the width column, the calculation should be PI()*(F2/2)^2

So, given the example table below, the 1st, 2nd, and 4th rows should simply multiply the length by width, while the 3rd and 5th rows should output the PI()*(F2/2)^2 formula.

I tried using conditional formatting along with ISBLANK, but couldn't get it working correctly.

Length | Width  
5      | 6    
3      | 4  
6      |
2      | 6  
5      |
1

=ARRAYFORMULA(IF(LEN(A2:A), IF(LEN(B2:B), A2:A*B2:B, PI()*(A2:A/2)^2), ))

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.