ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If with a range (https://www.excelbanter.com/excel-worksheet-functions/35564-if-range.html)

Annette

If with a range
 
I wanted to include a range in this calculation but not sure how.

=IF(M5="0",L5*K5,0)

The range would be if anything found in columns M through Q = 0, then ...

How would I write this?

Thanks!

Annette




Bernie Deitrick

Annette,

=IF(COUNTIF(M5:Q5,0)=0,"What to do if true", "What to do if false")

perhaps:

=IF(COUNTIF(M5:Q5,0)=0,L5*K5,0)

HTH,
Bernie
MS Excel MVP


"Annette" wrote in message ...
I wanted to include a range in this calculation but not sure how.

=IF(M5="0",L5*K5,0)

The range would be if anything found in columns M through Q = 0, then ...

How would I write this?

Thanks!

Annette







All times are GMT +1. The time now is 09:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com