hi all
i am trying to use the conditional formating by comparing two cells,
both are date formated but one is *may-1-06* and the othe is
*may-9-06*, i would like to compare only the month and year, it sould
not matter what day of the month, so the above date should match in my
conditional formation.
mybe there is a way to change all the -days- in all the dates to be
the same, like the first of the month.
any idea, VB solution .
thank you all.
marwan--
mostakimm
------------------------------------------------------------------------
mostakimm's Profile: www.excelforum.com/member.php...oamp;userid=20025
View this thread: www.excelforum.com/showthread...hreadid=499482If you have a date in A1,
=DATE(YEAR(A1),MONTH(A1),1)
should return the date for the first of the month for the month and year the
date in A1 represents.
Stevequot;mostakimmquot; gt; wrote in
message ...
gt;
gt; hi all
gt;
gt; i am trying to use the conditional formating by comparing two cells,
gt; both are date formated but one is *may-1-06* and the othe is
gt; *may-9-06*, i would like to compare only the month and year, it sould
gt; not matter what day of the month, so the above date should match in my
gt; conditional formation.
gt;
gt; mybe there is a way to change all the -days- in all the dates to be
gt; the same, like the first of the month.
gt;
gt; any idea, VB solution .
gt;
gt; thank you all.
gt; marwan
gt;
gt;
gt; --
gt; mostakimm
gt; ------------------------------------------------------------------------
gt; mostakimm's Profile:
gt; www.excelforum.com/member.php...oamp;userid=20025
gt; View this thread: www.excelforum.com/showthread...hreadid=499482
gt;
Maybe you can use something like:
=TEXT(A1,quot;yyyymmquot;)=TEXT(B1,quot;yyyymmquot;)
in your conditional formatting formula.
mostakimm wrote:
gt;
gt; hi all
gt;
gt; i am trying to use the conditional formating by comparing two cells,
gt; both are date formated but one is *may-1-06* and the othe is
gt; *may-9-06*, i would like to compare only the month and year, it sould
gt; not matter what day of the month, so the above date should match in my
gt; conditional formation.
gt;
gt; mybe there is a way to change all the -days- in all the dates to be
gt; the same, like the first of the month.
gt;
gt; any idea, VB solution .
gt;
gt; thank you all.
gt; marwan
gt;
gt; --
gt; mostakimm
gt; ------------------------------------------------------------------------
gt; mostakimm's Profile: www.excelforum.com/member.php...oamp;userid=20025
gt; View this thread: www.excelforum.com/showthread...hreadid=499482
--
Dave Peterson
If you use this it will give you the number of months between the 2
dates and you could use this number foir conditional formating
=DATEDIF(A1,B1,quot;ymquot;)--
intruder9
------------------------------------------------------------------------
intruder9's Profile: www.excelforum.com/member.php...oamp;userid=30107
View this thread: www.excelforum.com/showthread...hreadid=499482
Sorry should have been =DATEDIF(A1,B1,quot;mquot;)--
intruder9
------------------------------------------------------------------------
intruder9's Profile: www.excelforum.com/member.php...oamp;userid=30107
View this thread: www.excelforum.com/showthread...hreadid=499482
Thnk you all for the great help --
mostakimm
------------------------------------------------------------------------
mostakimm's Profile: www.excelforum.com/member.php...oamp;userid=20025
View this thread: www.excelforum.com/showthread...hreadid=499482
- Jul 16 Mon 2007 20:38
ingnoring day in date frmat
close
全站熱搜
留言列表
發表留言