Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 19
Default Using "Non-Empty Cell"

I have a several columns of numbers, and I want to calculate the last cell
in the column divided by the first cell in each case (= B300/B1).
However, some columns do not extend all the way back to cell 1. For example,
column F might contain values only from F65 to F300 and so I want to
calculate = F300/F65 in this case. The cells always contain continuous
values when they start.

I want to write a formula to say "F300/highest cell with a value"?

Can anyone suggest a way?

Thanks,

Steve


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Using "Non-Empty Cell"

Assuming the last cell is *always* on row 300:

=IF(COUNT(B1:B300),B300/INDEX(B1:B300,MATCH(TRUE,INDEX(B1:B300<"",,1),0)) ,"")

Copy across as needed.

--
Biff
Microsoft Excel MVP


"Steve" wrote in message
...
I have a several columns of numbers, and I want to calculate the last cell
in the column divided by the first cell in each case (= B300/B1).
However, some columns do not extend all the way back to cell 1. For
example, column F might contain values only from F65 to F300 and so I want
to calculate = F300/F65 in this case. The cells always contain continuous
values when they start.

I want to write a formula to say "F300/highest cell with a value"?

Can anyone suggest a way?

Thanks,

Steve



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Using "Non-Empty Cell"

Slightly shorter, but volatile:

=IF(COUNT(B1:B300),B300/OFFSET(B1,COUNTBLANK(B1:B300),),"")

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Assuming the last cell is *always* on row 300:

=IF(COUNT(B1:B300),B300/INDEX(B1:B300,MATCH(TRUE,INDEX(B1:B300<"",,1),0)) ,"")

Copy across as needed.

--
Biff
Microsoft Excel MVP


"Steve" wrote in message
...
I have a several columns of numbers, and I want to calculate the last cell
in the column divided by the first cell in each case (= B300/B1).
However, some columns do not extend all the way back to cell 1. For
example, column F might contain values only from F65 to F300 and so I
want to calculate = F300/F65 in this case. The cells always contain
continuous values when they start.

I want to write a formula to say "F300/highest cell with a value"?

Can anyone suggest a way?

Thanks,

Steve





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Using "Non-Empty Cell"

Ok, this IS my final answer! <g

=IF(COUNT(B1:B300),B300/INDEX(B1:B300,COUNTBLANK(B1:B300)+1),"")

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Slightly shorter, but volatile:

=IF(COUNT(B1:B300),B300/OFFSET(B1,COUNTBLANK(B1:B300),),"")

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Assuming the last cell is *always* on row 300:

=IF(COUNT(B1:B300),B300/INDEX(B1:B300,MATCH(TRUE,INDEX(B1:B300<"",,1),0)) ,"")

Copy across as needed.

--
Biff
Microsoft Excel MVP


"Steve" wrote in message
...
I have a several columns of numbers, and I want to calculate the last
cell in the column divided by the first cell in each case (= B300/B1).
However, some columns do not extend all the way back to cell 1. For
example, column F might contain values only from F65 to F300 and so I
want to calculate = F300/F65 in this case. The cells always contain
continuous values when they start.

I want to write a formula to say "F300/highest cell with a value"?

Can anyone suggest a way?

Thanks,

Steve







  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Using "Non-Empty Cell"

On Sat, 26 Jan 2008 17:55:07 -0000, "Steve" wrote:

I have a several columns of numbers, and I want to calculate the last cell
in the column divided by the first cell in each case (= B300/B1).
However, some columns do not extend all the way back to cell 1. For example,
column F might contain values only from F65 to F300 and so I want to
calculate = F300/F65 in this case. The cells always contain continuous
values when they start.

I want to write a formula to say "F300/highest cell with a value"?

Can anyone suggest a way?

Thanks,

Steve



So long as the only data in the columns are the number entries, then:

=F300/OFFSET(F300,1-COUNT(F1:F300),0)
--ron


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default Using "Non-Empty Cell"

If it is possible that your last filled cell can be something other than
300, then this volatile formula will calculate the value in the filled cell
with the highest row number divided by the filled cell with the lowest row
number...

=LOOKUP(9999999999,B1:B300)/INDIRECT("B"&SUMPRODUCT(MIN(9999999999-(B1:B300<"")*(9999999999-ROW(B1:B300)))))

The three occurrences of 9999999999 can be replaced by any number guaranteed
to be larger than the maximum value that can occur in the range B1:B300.

Rick


"Steve" wrote in message
...
I have a several columns of numbers, and I want to calculate the last cell
in the column divided by the first cell in each case (= B300/B1).
However, some columns do not extend all the way back to cell 1. For
example, column F might contain values only from F65 to F300 and so I want
to calculate = F300/F65 in this case. The cells always contain continuous
values when they start.

I want to write a formula to say "F300/highest cell with a value"?

Can anyone suggest a way?

Thanks,

Steve


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default Using "Non-Empty Cell"

By the way, I meant to mention... the formula I posted is not dependent on
the range between the lowest filled cell and the highest filled cell being
contiguously filled (there can be gaps in the data and the formula will
still work).

Rick

"Rick Rothstein (MVP - VB)" wrote in
message ...
If it is possible that your last filled cell can be something other than
300, then this volatile formula will calculate the value in the filled
cell with the highest row number divided by the filled cell with the
lowest row number...

=LOOKUP(9999999999,B1:B300)/INDIRECT("B"&SUMPRODUCT(MIN(9999999999-(B1:B300<"")*(9999999999-ROW(B1:B300)))))

The three occurrences of 9999999999 can be replaced by any number
guaranteed to be larger than the maximum value that can occur in the range
B1:B300.

Rick


"Steve" wrote in message
...
I have a several columns of numbers, and I want to calculate the last cell
in the column divided by the first cell in each case (= B300/B1).
However, some columns do not extend all the way back to cell 1. For
example, column F might contain values only from F65 to F300 and so I
want to calculate = F300/F65 in this case. The cells always contain
continuous values when they start.

I want to write a formula to say "F300/highest cell with a value"?

Can anyone suggest a way?

Thanks,

Steve



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
Cell appears empty, is not "Blank" RJB Excel Discussion (Misc queries) 3 December 5th 07 04:34 PM
How I prevent a "0" when a linked cell is empty? Mickyg Excel Worksheet Functions 1 October 10th 07 01:48 PM
Can IF function return an empty cell? (not "") mtnw Excel Worksheet Functions 1 January 10th 07 11:01 PM
Excel: can "go to adjacent empty cell" double-click be disabled? dgg2006 Excel Discussion (Misc queries) 1 April 8th 06 04:51 AM
a formula that leaves cell "empty"? sarahmross Excel Worksheet Functions 6 November 11th 05 06:17 AM


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