View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
chocoearl chocoearl is offline
external usenet poster
 
Posts: 3
Default Excel If function based on a date

On Feb 18, 11:02*am, Pete_UK wrote:
OK, thanks. I made this formula and it worked: =(IF(AND(ISNUMBER
(F4),F435000),G4+B4,"")-U4) but I would also like it to look at the
date in H4 and add I4 as well to B4. Basically, I want it to add the
values in G4 and H4 to B4 if either has a date 35000.

Earl

You can't specifically test for a date very easily, as this is just a
number to Excel, but you could do something like this:

=IF(AND(ISNUMBER(D1),D135000),A1+B1,"")

where A1 and B1 are the cells you want to add and D1 is the cell that
may have a date in it. The value 35000 elates to 28th October 1995, so
the date would need to be later than that.

Hope this helps.

How would I incorporate that in to this formula?

The formula I want to enter in cell V4 (column labeled "New Total") of
my 'Savings Breakdown'! tab would be the equivalent of this:

V4 =If F4 or H4 has a date entered, then SUM(B4+G4+I4), then subtract
the value in cell U4 from that sum, but IF F4 or H4 does not have a
date entered, then value in V4 =B4-U4.



Pete

On Feb 18, 6:23*pm, chocoearl wrote:

How do I make an If-Then formula to add the value of two cells only if
another cell contains a date entry?


Earl