Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Unhappy Comparing MONTH and YEAR inside Formula ??

Hello:

I have this below compare in a CELL...

=SUMPRODUCT((Clarity!$A$1:$A$3000=A27)*(Clarity!$B $1:$B$3000="January 2012"),Clarity!$E$1:$E$3000)

Everything works but I need to insert something other than a literal "2012" when the year flips to 2013 or I will have to update 12 CELLS for 17 people every year... is there a way to insert a MACRO for each of the twelve monthly CELLS, such as;

="January "& NOW(YEAR) or something different that works????

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default Comparing MONTH and YEAR inside Formula ??

Hi,

Am Sat, 22 Dec 2012 17:25:51 +0000 schrieb FPerg:

=SUMPRODUCT((Clarity!$A$1:$A$3000=A27)*(Clarity!$B $1:$B$3000="January
2012"),Clarity!$E$1:$E$3000)

Everything works but I need to insert something other than a literal
"2012" when the year flips to 2013 or I will have to update 12 CELLS for
17 people every year... is there a way to insert a MACRO for each of the
twelve monthly CELLS, such as;

="January "& NOW(YEAR) or something different that works????


if you want a formula, try:
=SUMPRODUCT(--(Clarity!$A$1:$A$3000=A27),--(MONTH(Clarity!$B$1:$B$3000)=1),--(YEAR(Clarity!$B$1:$B$3000)=YEAR(TODAY())),Clarity !$E$1:$E$3000)
for January of the current year


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract Month and year from Cell containing date, month, year & time Montenegro Mick Excel Worksheet Functions 2 May 2nd 12 03:17 AM
Year as well as month in formula Saylindara Excel Discussion (Misc queries) 3 December 13th 09 10:07 PM
Tell me which "season" (Month/Day through Month/Day) a date(Month/Day/Year) falls in (any year)??? misscrf Excel Discussion (Misc queries) 1 December 14th 07 02:59 PM
IF statement comparing month and year separately spence Excel Worksheet Functions 6 April 26th 07 10:47 PM
Formula to return last day of month for each month in year? StargateFan[_3_] Excel Programming 5 January 3rd 06 04:05 AM


All times are GMT +1. The time now is 03:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"