Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default IF this cell is between 2/1/2015-2/28/15, then do something

What is the conditional formula for a date driven statement?

Thank you
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default IF this cell is between 2/1/2015-2/28/15, then do something

Hi,

Am Thu, 19 Feb 2015 17:50:04 +0000 schrieb David Zman:

What is the conditional formula for a date driven statement?


=IF(AND(A1=DATEVALUE("01.02.2015"),A1<=DATEVALUE( "28.02.2015")),Your Formula,"")


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 829
Default IF this cell is between 2/1/2015-2/28/15, then do something

"Claus Busch" wrote:
Am Thu, 19 Feb 2015 17:50:04 +0000 schrieb David Zman:
What is the conditional formula for a date driven statement?


=IF(AND(A1=DATEVALUE("01.02.2015"),A1<=DATEVALUE( "28.02.2015")),Your
Formula,"")


Claus's example demonstrates why it is ill-advised to use DATEVALUE: the
form of string depends on regional differences. Claus writes dates as
dd.mm.yyyy, whereas the Subject indicates that David writes mm/dd/yyyy.

Better.... If your unconditional formula would be =B1+C1 and your date is
in A1, write:

=IF(AND(DATE(2015,2,1)<=A1,A1<=DATE(2015,2,28)), B1+C1, "")
or
=IF(MONTH(A1)=2, B1+C1, "")

Use the latter if the date range is always a full calendar month, as your
example is.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with error 2015 in macro Matt Knight Excel Programming 1 January 24th 10 11:23 PM
Error 2015 Jeff Excel Programming 2 May 25th 06 08:38 PM
N/A # and error 2015 ina Excel Programming 8 April 27th 06 10:50 AM
Error 2015 gaba Excel Programming 4 December 17th 04 01:49 AM
Error 2015 from ConvertFormula Gordon[_13_] Excel Programming 0 April 29th 04 02:48 AM


All times are GMT +1. The time now is 10:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"