Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Find the number of weeks using an array

I have a table , dimensions A3:AL17
Column A is the owner and columns B:E are info relating to the owner
Cells F3:AL3 (column headers) are weekly dates (from 11-May through to
21-Dec), custom formatted dd-mmm
Cells F4:AL17 will be blank or contain either "X" or "Hols"

I am trying to calculate the number of weeks since the last "X" in
each row of the table in relation to today's date.

For example, I have the following to get the difference between a
fixed date (column H) and today's date in Weeks
=TRUNC((TODAY()-H$3)/7)&" Weeks", where H3 contains 25-May I get the
answer 3 Weeks

and an array formula to get the last instance of "X" on a specific
row,
=(INDEX(F$3:AL$3,MAX((F4:AL4="X")*(COLUMN(F$4:AL$4 )-5)))) , where
there is "X" in columns G (18-May) and J (08-Jun) I get the answer 08-
Jun

however when I try to combine them, I get a value of 34891 weeks
instead of the 1 week I am expecting
=TRUNC((TODAY()-(INDEX(F$3:AL$3,MAX((F4:AL4="X")*(COLUMN(F$4:AL
$4)-5))))/7))&" Weeks"

Any help gratefully received

Regards
Fred
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
How do i find my post from a few weeks ago Ratboy Excel Discussion (Misc queries) 5 March 11th 10 11:08 AM
Work out number of weeks Sarah (OGI) Excel Discussion (Misc queries) 5 October 29th 08 12:56 AM
Find first occurence of a number in an array 7 cols wide Ricardo-SA Excel Worksheet Functions 3 April 5th 08 11:22 PM
add a number every two weeks Big Rob Excel Worksheet Functions 1 November 15th 06 12:59 AM
Find numbers in an array that sum to a certain number tommydancer Excel Worksheet Functions 3 September 9th 06 03:11 PM


All times are GMT +1. The time now is 09:43 AM.

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

About Us

"It's about Microsoft Excel"