Year function

B

BenT

Hi All
I am using this formula and it's working great. =IF(MONTH(TODAY())=MONTH(A1),A2,"")
In addition to this I need to qualify that the date in A1 also reads the year.
I struggled long enough, please , can anyone help me?
Thanks
Ben
 
D

Dave Peterson

=if(and(month(today())=month(a1),year(today())=year(a1)),a2,"")

But I like:
=if(text(today(),"yyyymm")=text(a1,"yyyymm"),a2,"")
 
R

Roger Govier

Hi Ben

One way
=IF(TEXT(TODAY(),"yyyymm")=TEXT(A1,"yyyymm"),A2,"")

--
Regards
Roger Govier
Hi All
I am using this formula and it's working great. =IF(MONTH(TODAY())=MONTH(A1),A2,"")
In addition to this I need to qualify that the date in A1 also reads the year.
I struggled long enough, please , can anyone help me?
Thanks
Ben
 
N

Niek Otten

Hi Ben,

=IF(MONTH(TODAY())&YEAR(TODAY())=MONTH(A1)&YEAR(A1),A2,"")

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

Hi All
I am using this formula and it's working great. =IF(MONTH(TODAY())=MONTH(A1),A2,"")
In addition to this I need to qualify that the date in A1 also reads the year.
I struggled long enough, please , can anyone help me?
Thanks
Ben
 
B

BenT

Fantastic;
You guys have saved my a-- again, and fast also. I'll have it done by tomorrow's work day.
Greatly appreciated. Thanks.
Ben
Hi Ben,

=IF(MONTH(TODAY())&YEAR(TODAY())=MONTH(A1)&YEAR(A1),A2,"")

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

Hi All
I am using this formula and it's working great. =IF(MONTH(TODAY())=MONTH(A1),A2,"")
In addition to this I need to qualify that the date in A1 also reads the year.
I struggled long enough, please , can anyone help me?
Thanks
Ben
 
N

Niek Otten

Better!

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

Hi Ben

One way
=IF(TEXT(TODAY(),"yyyymm")=TEXT(A1,"yyyymm"),A2,"")

--
Regards
Roger Govier
Hi All
I am using this formula and it's working great. =IF(MONTH(TODAY())=MONTH(A1),A2,"")
In addition to this I need to qualify that the date in A1 also reads the year.
I struggled long enough, please , can anyone help me?
Thanks
Ben
 
N

Niek Otten

Sorry Dave, of course I meant "better than mine"!

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

| Better!
|
| --
| Kind regards,
|
| Niek Otten
| Microsoft MVP - Excel
|
| Hi Ben
|
| One way
| =IF(TEXT(TODAY(),"yyyymm")=TEXT(A1,"yyyymm"),A2,"")
|
| --
| Regards
| Roger Govier
| Hi All
| I am using this formula and it's working great. =IF(MONTH(TODAY())=MONTH(A1),A2,"")
| In addition to this I need to qualify that the date in A1 also reads the year.
| I struggled long enough, please , can anyone help me?
| Thanks
| Ben
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top