• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

WEEKNUM in Array

madocar

Member
Hi everyone,

is there a way how to fix this. When I put this formula an error is occured.

Problem is with this part of formula ... WEEKNUM($H$2:$H$5)=WEEKNUM(TODAY() ..

Is there any way how to fix or do I only need helper column which calculate weeknum of those dates?

Look to my excel file please.

Thanks a lot for any help
 

Attachments

  • cha.xlsx
    13.2 KB · Views: 9
WEEKNUM is one of the formula that does not accept range argument. As you stated, helper column is probably the easiest route.
 
Hi,

Not sure 100%, see if this works:

=IFERROR(INDEX($B$2:$M$5,SMALL(IF(IFERROR(INT(($H$2:$H$5-DATE(YEAR($H$2:$H$5),1,1)-WEEKDAY($H$2:$H$5,2))/7)+2,0)=WEEKNUM(TODAY()),ROW($H$2:$H$5)-1),ROWS($M$12:$M12)),COLUMNS($M$10:M$10)),"")

{array formula}

Regards,
 
Hello Madocar,

Try this in the WEEKNUM place

WEEKNUM(OFFSET(H$3,ROW(H$3:H$5)-ROW(H$3),))

So the entire formula would be,

=IFERROR(INDEX($B:$M,SMALL(IF(WEEKNUM(OFFSET(H$3,ROW(H$3:H$5)-ROW(H$3),))=WEEKNUM(TODAY()),ROW(H$3:H$5)),ROWS($M$12:M12)),COLUMNS($M$10:M$10)),"")
 
Back
Top