Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 76
Default How days since last visited

I am trying to figure out how to determine how days it has been since someone
last visited. I have a weekly attendance sheet that listed a class roster in
column A3:A10. Running across the top D2:I2 are class dates 1/04/09, 1/11/09,
1/18/09, 1/25/09, 2/02/09... When someone attends a 'X' is placed in the cell.

So if someone's last attendance was 1/04/09 the formula would return 13.

Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default How days since last visited

Try this:

=IF(COUNTIF(D3:I3,"x"),TODAY()-LOOKUP("zzzzz",D3:I3,D2:I2),"no records")

--
Biff
Microsoft Excel MVP


"Pablo" wrote in message
...
I am trying to figure out how to determine how days it has been since
someone
last visited. I have a weekly attendance sheet that listed a class roster
in
column A3:A10. Running across the top D2:I2 are class dates 1/04/09,
1/11/09,
1/18/09, 1/25/09, 2/02/09... When someone attends a 'X' is placed in the
cell.

So if someone's last attendance was 1/04/09 the formula would return 13.

Any ideas?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 896
Default How days since last visited

mine is a slightly more complicated solution as cd. to that of Biff

=IF(COUNTIF(D3:I3,"x"),TODAY()-OFFSET($C$2,,MAX(IF(D3:I3="x",COLUMN
(D3:I3)-1,""))),"no attendances")

CTRL+SHIFT+ENTER this formula cause this is an array formula


On 18 Sty, 05:17, Pablo wrote:
I am trying to figure out how to determine how days it has been since someone
last visited. I have a weekly attendance sheet that listed a class roster in
column A3:A10. Running across the top D2:I2 are class dates 1/04/09, 1/11/09,
1/18/09, 1/25/09, 2/02/09... When someone attends a 'X' is placed in the cell.

So if someone's last attendance was 1/04/09 the formula would return 13.

Any ideas?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 76
Default How days since last visited

Biff,

Thanks. What does "zzzzz" represent? Also, is there a way to use a HLookup?

Paul

"T. Valko" wrote:

Try this:

=IF(COUNTIF(D3:I3,"x"),TODAY()-LOOKUP("zzzzz",D3:I3,D2:I2),"no records")

--
Biff
Microsoft Excel MVP


"Pablo" wrote in message
...
I am trying to figure out how to determine how days it has been since
someone
last visited. I have a weekly attendance sheet that listed a class roster
in
column A3:A10. Running across the top D2:I2 are class dates 1/04/09,
1/11/09,
1/18/09, 1/25/09, 2/02/09... When someone attends a 'X' is placed in the
cell.

So if someone's last attendance was 1/04/09 the formula would return 13.

Any ideas?




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default How days since last visited

What does "zzzzz" represent?

zzzzz is the lookup_value. This may be hard to understand....

If the lookup_value is greater than any value in the lookup_vector the
formula will return the result that corresponds to the *last text* value in
the lookup_vector that is *less than* the lookup_value. You're entering an
"x" to denote attendance. "X" is less than "zzzzz" so the formula "finds"
the *last* "x" in the range and uses the corresponding date.

is there a way to use a HLookup?


No. With HLOOKUP, you would lookup a date and return data from the rows
below the date headers. In your application you have to find the last "x"
before you can find the corresponding date.


--
Biff
Microsoft Excel MVP


"Pablo" wrote in message
...
Biff,

Thanks. What does "zzzzz" represent? Also, is there a way to use a
HLookup?

Paul

"T. Valko" wrote:

Try this:

=IF(COUNTIF(D3:I3,"x"),TODAY()-LOOKUP("zzzzz",D3:I3,D2:I2),"no records")

--
Biff
Microsoft Excel MVP


"Pablo" wrote in message
...
I am trying to figure out how to determine how days it has been since
someone
last visited. I have a weekly attendance sheet that listed a class
roster
in
column A3:A10. Running across the top D2:I2 are class dates 1/04/09,
1/11/09,
1/18/09, 1/25/09, 2/02/09... When someone attends a 'X' is placed in
the
cell.

So if someone's last attendance was 1/04/09 the formula would return
13.

Any ideas?






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
Employee days worked (-Holidays, -weekends, Snow Days, etc) Denise Excel Discussion (Misc queries) 2 December 31st 08 04:37 PM
Calc days between two dates and exclude leap year days scoz Excel Worksheet Functions 5 November 23rd 07 03:58 PM
Conditional Formatting Dates calculating 10 days and 30 days from a certain date Sioux[_2_] Excel Worksheet Functions 2 October 11th 07 02:04 PM
COUNT how many ROWS ago out of 10 days that the highest high in 10 days was made rhhince Excel Worksheet Functions 1 January 14th 07 09:56 PM
Remove content of last visited pages in "Insert Hyperlink" dialog Excel bloke Excel Worksheet Functions 4 June 12th 06 12:37 AM


All times are GMT +1. The time now is 05:25 PM.

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"