Home |
Search |
Today's Posts |
#6
![]() |
|||
|
|||
![]()
The answer Biff/Bernd gave you will do what you ask, but for no other reason
than that I was curious to try and do it in a single formula with no helper cells:- Taking their formula and introducing an array element - Given that you have 21 years in your spread, select cells A1:A21, paste in the following and array enter it:- =IF(LARGE((WEEKDAY(DATE(ROW(INDIRECT("1970:1990")) ,4,1),2)=6)*(DATE(ROW(INDIRECT("1970:1990")),4,1)) ,ROW(INDIRECT("1:21"))),LARGE((WEEKDAY(DATE(ROW(IN DIRECT("1970:1990")),4,1),2)=6)*(DATE(ROW(INDIRECT ("1970:1990")),4,1)),ROW(INDIRECT("1:21"))),"") Format cells as custom yyyy Results 1989 1978 1972 -- Regards Ken....................... Microsoft MVP - Excel Sys Spec - Win XP Pro / XL 97/00/02/03 ---------------------------------------------------------------------------- It's easier to beg forgiveness than ask permission :-) ---------------------------------------------------------------------------- "Biff" wrote in message ... Hi! =WEEKDAY(DATE(A1+ROW()-1,4,1),2)=6 This leads to incorrect results. ROW()-1 causes the problem. =WEEKDAY(DATE(A1,4,1),2)=6 Works just fine. Biff -----Original Message----- Write in cells A1:A21 the year numbers 1970 till 1990. In B1 write: =WEEKDAY(DATE(A1+ROW()-1,4,1),2)=6 and copy down. HTH, Bernd . --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.788 / Virus Database: 533 - Release Date: 01/11/2004 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with Years of Service formula.... | Excel Discussion (Misc queries) | |||
How do I display months and years between two dates | Excel Discussion (Misc queries) |