ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If and Date Ranges (https://www.excelbanter.com/excel-worksheet-functions/196212-if-date-ranges.html)

Romanli

If and Date Ranges
 
How do I use the if function if I want to highlight the rows where certain
cells are within certain date ranges

If n2is between 07/01/208 and 07/23/2008 and b2 is between 08/01/0808 and
08/31/2008.

I will want to highlight the rows - but would settle for a simple yes or no.

OssieMac

If and Date Ranges
 
Hi Romanli,

the following should give you a "Yes" or "No".

=IF(AND(N2=DATEVALUE("7/1/2008"),N2<=DATEVALUE("7/23/2008"),B2=DATEVALUE("8/1/2008"),B2<=DATEVALUE("8/31/2008")),"Yes","No")


Note that the above is all one line of formula.

--
Regards,

OssieMac


"Romanli" wrote:

How do I use the if function if I want to highlight the rows where certain
cells are within certain date ranges

If n2is between 07/01/208 and 07/23/2008 and b2 is between 08/01/0808 and
08/31/2008.

I will want to highlight the rows - but would settle for a simple yes or no.



All times are GMT +1. The time now is 03:43 PM.

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