Formula not working/updating.

doumamar

New Member
Joined
Jul 15, 2010
Messages
41
Hi,

I have built a reminder function which evaluated whether TODAY() is inbetween 2 different dates. Using the below function:

=IF(J6>=H6,IF(J6<=I6,"TRUE","FALSE"),"FALSE")

However the formula comes up as TRUE when:

Today = 29/07/2010
Lower bound = 14/07/2010
Upper bound = 23/07/2010

Any ideas what is going wrong? I even re wrote the formula and it still appeared TRUE. Yet it works for most of the other dates?

Thanks
David
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

WaterGypsy

Well-known Member
Joined
Jan 15, 2010
Messages
697
Works OK for me .... are you sure that H6 & I6 are date format fields or are they text fields that look like dates?
 

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
With this data in H6:I6:

<TABLE style="WIDTH: 159pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=213 x:str><COLGROUP><COL style="WIDTH: 53pt; mso-width-source: userset; mso-width-alt: 2596" span=3 width=71><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent; WIDTH: 53pt; HEIGHT: 12.75pt; BORDER-TOP: windowtext 0.5pt solid; BORDER-RIGHT: windowtext 0.5pt solid" class=xl22 height=17 width=71 align=right x:num="40373">14/07/2010</TD><TD style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext; BACKGROUND-COLOR: transparent; WIDTH: 53pt; BORDER-TOP: windowtext 0.5pt solid; BORDER-RIGHT: windowtext 0.5pt solid" class=xl22 width=71 align=right x:num="40382">23/07/2010</TD><TD style="BORDER-BOTTOM: windowtext 0.5pt solid; BORDER-LEFT: windowtext; BACKGROUND-COLOR: transparent; WIDTH: 53pt; BORDER-TOP: windowtext 0.5pt solid; BORDER-RIGHT: windowtext 0.5pt solid" class=xl22 width=71 align=right x:num="40388" x:fmla="=TODAY()">29/07/2010</TD></TR></TBODY></TABLE>

your formula returned FALSE, as did:

=AND(J6>=H6,J6<=I6)
 

doumamar

New Member
Joined
Jul 15, 2010
Messages
41
Yes they are all in the exact same date format. It is ridiculous, it works perfectly for the rest, just 2 entries have problems.
 

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092

ADVERTISEMENT

Use the ISNUMBER function to check that each cell contains a serial date. For example:

=ISNUMBER(H6)

will return TRUE if it's a serial date. If it returns FALSE format the cell as other than Text and press F2 then Enter.
 

doumamar

New Member
Joined
Jul 15, 2010
Messages
41
I used AND(J6>=H6,J6<=I6) and got TRUE still :(... I don't get it, I really don't!
 

WaterGypsy

Well-known Member
Joined
Jan 15, 2010
Messages
697

ADVERTISEMENT

When you say two entries .... are you working with a number of dates in a column ?
 

doumamar

New Member
Joined
Jul 15, 2010
Messages
41
Poulson, you are good! The middle date was not a number on my new entries. I don't know why it isn't will have to find out. Any idea how to make sure it is? The data comes from a userform.


Thanks!!!!!

Edit: I found the input problem! Thanks for all your help! :)
 
Last edited:

doumamar

New Member
Joined
Jul 15, 2010
Messages
41
Right, I used the following to populate the exact cell where the date is not recognised as a date until i enter the cell and then exit it.


ActiveCell.Offset(0, 2).Value = txtRDate2.Value

Why is it that the cell is not populated with a date in the first place?

Thanks
David
 

Watch MrExcel Video

Forum statistics

Threads
1,132,678
Messages
5,654,709
Members
418,149
Latest member
tjanok

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top