close

cannot get the following equation to work, is it wrong?
only way to get to switch TRUE to FALSE, is to flip gt; to lt;; Changing the
days in A4 having no effect.

=IF(TODAY()gt;DATE(MID(C4,2,2),MID(C4,4,2),MID(C4,6, 2)-$A$4),quot;yesquot;,quot;noquot;)

details:
am trying to find a number within text, to do a calculation on it. Item is as:
:060120 at the left of a cell, with text following.

(need to treat as a date in another cell: to See if within future range of
x days)
A4 has: 5
B4 has: =TODAY()
C4 has:
:060122

D4 has:
=DATE(MID(C4,2,2),MID(C4,4,2),MID(C4,6,2)-$A$4) seems to work

not working:
=IF(TODAY()gt;DATE(MID(C4,2,2),MID(C4,4,2),MID(C4,6, 2)-$A$4),quot;yesquot;,quot;noquot;)=TODAY()gt;DATE(MID(C4,2,2),MID(C4,4,2),MID(C4,6,2)-$A$4) will reveal if you
are actually comparing dates.If you dont get true when you know you should
then excel isnt seeing the numbers/dates/text as you think!

paul
remove nospam for email addy!
quot;nastechquot; wrote:

gt; cannot get the following equation to work, is it wrong?
gt; only way to get to switch TRUE to FALSE, is to flip gt; to lt;; Changing the
gt; days in A4 having no effect.
gt;
gt; =IF(TODAY()gt;DATE(MID(C4,2,2),MID(C4,4,2),MID(C4,6, 2)-$A$4),quot;yesquot;,quot;noquot;)
gt;
gt; details:
gt; am trying to find a number within text, to do a calculation on it. Item is as:
gt; :060120 at the left of a cell, with text following.
gt;
gt; (need to treat as a date in another cell: to See if within future range of
gt; x days)
gt; A4 has: 5
gt; B4 has: =TODAY()
gt; C4 has:
gt; :060122
gt;
gt; D4 has:
gt; =DATE(MID(C4,2,2),MID(C4,4,2),MID(C4,6,2)-$A$4) seems to work
gt;
gt; not working:
gt; =IF(TODAY()gt;DATE(MID(C4,2,2),MID(C4,4,2),MID(C4,6, 2)-$A$4),quot;yesquot;,quot;noquot;)
gt;


If you format the cell with the date expression that works in to show
the year as 4 figures you will see it is 1906 not 2006 as you probably
think, the logic works but the date is not the date you think it is, if
in the year bit of the formula you add 100 it should work as you want

=IF(TODAY()gt;DATE(MID(C4,2,2) 100,MID(C4,4,2),MID(C 4,6,
2)-$A$4),quot;yesquot;,quot;noquot;)

cheer

Dav--
Dav
------------------------------------------------------------------------
Dav's Profile: www.excelforum.com/member.php...oamp;userid=27107
View this thread: www.excelforum.com/showthread...hreadid=502366You the man!, did get the equation from someone else, so was 2 parter... knew
would be a tuff question, just like couldn't find how to quot;fixquot; a cell for
6mo/year..
(after cond. format, accidental click in external cell see $$$, hit help...
was pretty ugly), don't know why they don't have preset format for old
database types see sorting by yymmdd, .... anyways now still working on
figuring out web queries, can see that is going to be a pain, it's not just
listed somewhere how to simply do it. THANKS .!!!!

quot;Davquot; wrote:

gt;
gt; If you format the cell with the date expression that works in to show
gt; the year as 4 figures you will see it is 1906 not 2006 as you probably
gt; think, the logic works but the date is not the date you think it is, if
gt; in the year bit of the formula you add 100 it should work as you want
gt;
gt; =IF(TODAY()gt;DATE(MID(C4,2,2) 100,MID(C4,4,2),MID(C 4,6,
gt; 2)-$A$4),quot;yesquot;,quot;noquot;)
gt;
gt; cheer
gt;
gt; Dav
gt;
gt;
gt; --
gt; Dav
gt; ------------------------------------------------------------------------
gt; Dav's Profile: www.excelforum.com/member.php...oamp;userid=27107
gt; View this thread: www.excelforum.com/showthread...hreadid=502366
gt;
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()