Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Offset/COUNTA problems

I have a spreadsheet that looks like this:
A B
Time In Time Out
12:15 PM 8:00 PM
2:00 PM 3:00 PM
4:00 PM 6:00 PM
6:00 PM 6:30 PM
8:00 PM 11:30 PM

I'm trying to use the formula: =OFFSET(HeadCount!$B
$1,0,0,COUNTA(HeadCount!$B:$B),1) to come up with the last value in
column B, which should be 11:30pm. However, I keep getting a #VALUE!
error. If I take out the COUNTA part and just use: =OFFSET(HeadCount!
$B$1,0,0,6,1) I still get the error. If I replace the Row value of 6
with 1 in this formula, it gives me the correct value of "Time Out".
Why won't it return the value when it is a time format? Can anyone
tell me what I'm doing wrong. COUNTA and OFFSET work fine
independently. Thanks for any help!

-Josh
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 171
Default Offset/COUNTA problems

Use just the rows and cols arguments of the offset function (leaving out the
height and width) to generate a single-cell reference.
=OFFSET(HeadCount!$B$1,COUNTA(HeadCount!$B:$B),0)

" wrote:

I have a spreadsheet that looks like this:
A B
Time In Time Out
12:15 PM 8:00 PM
2:00 PM 3:00 PM
4:00 PM 6:00 PM
6:00 PM 6:30 PM
8:00 PM 11:30 PM

I'm trying to use the formula: =OFFSET(HeadCount!$B
$1,0,0,COUNTA(HeadCount!$B:$B),1) to come up with the last value in
column B, which should be 11:30pm. However, I keep getting a #VALUE!
error. If I take out the COUNTA part and just use: =OFFSET(HeadCount!
$B$1,0,0,6,1) I still get the error. If I replace the Row value of 6
with 1 in this formula, it gives me the correct value of "Time Out".
Why won't it return the value when it is a time format? Can anyone
tell me what I'm doing wrong. COUNTA and OFFSET work fine
independently. Thanks for any help!

-Josh

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Offset/COUNTA problems

=OFFSET(HeadCount!$B$1,COUNTA(HeadCount!$B:$B)-1,0)

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



wrote in message
...
I have a spreadsheet that looks like this:
A B
Time In Time Out
12:15 PM 8:00 PM
2:00 PM 3:00 PM
4:00 PM 6:00 PM
6:00 PM 6:30 PM
8:00 PM 11:30 PM

I'm trying to use the formula: =OFFSET(HeadCount!$B
$1,0,0,COUNTA(HeadCount!$B:$B),1) to come up with the last value in
column B, which should be 11:30pm. However, I keep getting a #VALUE!
error. If I take out the COUNTA part and just use: =OFFSET(HeadCount!
$B$1,0,0,6,1) I still get the error. If I replace the Row value of 6
with 1 in this formula, it gives me the correct value of "Time Out".
Why won't it return the value when it is a time format? Can anyone
tell me what I'm doing wrong. COUNTA and OFFSET work fine
independently. Thanks for any help!

-Josh



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Offset/COUNTA problems

Thanks that worked. But, now I'm not sure if I'm going about this the
right way. I want to use the formula as a named function and use that
as the source date of a chart I created. I'm trying to have the chart
update based on what the last row of data is, instead of just
arbitrarily using an ending row. So, instead of using something like
(=HeadCount!$A$2:$A$6) in the source data for the series, maybe it
would be (=HeadCount!TIME), if TIME was the name of the formula I was
orginally using. Not sure if this works like was orginally thinking.
Any ideas? THANKS
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
Compare Cell Values, Offset(-1,0), Offset(-1,-1), and xlFillDefaul RyGuy Excel Worksheet Functions 2 September 28th 07 10:54 PM
Problems with offset/average formula GaryC Excel Worksheet Functions 8 March 15th 06 07:14 PM
COUNTA Karen Excel Worksheet Functions 3 January 10th 06 09:48 PM
Problems copying cells using offset and counta hlckom Excel Discussion (Misc queries) 4 January 30th 05 12:49 AM
COUNTA Function not working =COUNTA(C3:C69,"NH") MikeinNH Excel Worksheet Functions 2 November 8th 04 01:19 AM


All times are GMT +1. The time now is 12:31 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"