Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
sgl sgl is offline
external usenet poster
 
Posts: 80
Default Last Value in a Range

I have the following formula results in a range B7:H7

B C D E F G H
10 25 0 12 0 13 17

I need a formula that will extract the last value in the range that is "17".
These values are claculated from embeded formulas in each cell so even though
columns D and F have a zero value they still have a formula in them

Many thanks/sgl
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Last Value in a Range

Try

=LOOKUP(6.022*10^23,B7:H7)

Mike

"sgl" wrote:

I have the following formula results in a range B7:H7

B C D E F G H
10 25 0 12 0 13 17

I need a formula that will extract the last value in the range that is "17".
These values are claculated from embeded formulas in each cell so even though
columns D and F have a zero value they still have a formula in them

Many thanks/sgl

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Last Value in a Range

Maybe your last value could be zero and you want the last number that isn't
zero si try this instead

=LOOKUP(2,1/(B7:H7<0),B7:H7)

Mike

"Mike H" wrote:

Try

=LOOKUP(6.022*10^23,B7:H7)

Mike

"sgl" wrote:

I have the following formula results in a range B7:H7

B C D E F G H
10 25 0 12 0 13 17

I need a formula that will extract the last value in the range that is "17".
These values are claculated from embeded formulas in each cell so even though
columns D and F have a zero value they still have a formula in them

Many thanks/sgl

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Last Value in a Range

Please explain...The last value in the range from B7 thru H7 will always be
the contents of H7??
--
Gary''s Student - gsnu200838


"sgl" wrote:

I have the following formula results in a range B7:H7

B C D E F G H
10 25 0 12 0 13 17

I need a formula that will extract the last value in the range that is "17".
These values are claculated from embeded formulas in each cell so even though
columns D and F have a zero value they still have a formula in them

Many thanks/sgl

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
sgl sgl is offline
external usenet poster
 
Posts: 80
Default Last Value in a Range

Mike, Thanks a lot for te very fast reply. Works great.

sgl

"Mike H" wrote:

Maybe your last value could be zero and you want the last number that isn't
zero si try this instead

=LOOKUP(2,1/(B7:H7<0),B7:H7)

Mike

"Mike H" wrote:

Try

=LOOKUP(6.022*10^23,B7:H7)

Mike

"sgl" wrote:

I have the following formula results in a range B7:H7

B C D E F G H
10 25 0 12 0 13 17

I need a formula that will extract the last value in the range that is "17".
These values are claculated from embeded formulas in each cell so even though
columns D and F have a zero value they still have a formula in them

Many thanks/sgl



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
sgl sgl is offline
external usenet poster
 
Posts: 80
Default Last Value in a Range

Sory my mistake for not being more explicit. The columns do not end at H7 but
at M7. From I7 to M7 they are zero values at present but may be calculated at
any time. My apologies once again for not being more explicit.

Mike H reply above was the solution I was looking for.

sgl

"Gary''s Student" wrote:

Please explain...The last value in the range from B7 thru H7 will always be
the contents of H7??
--
Gary''s Student - gsnu200838


"sgl" wrote:

I have the following formula results in a range B7:H7

B C D E F G H
10 25 0 12 0 13 17

I need a formula that will extract the last value in the range that is "17".
These values are claculated from embeded formulas in each cell so even though
columns D and F have a zero value they still have a formula in them

Many thanks/sgl

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Last Value in a Range

For the rightmost number excluding zeros:

=LOOKUP(1E100,1/B7:M7,B7:M7)

Assumes there are no logical values (TRUE) in the range.

--
Biff
Microsoft Excel MVP


"sgl" wrote in message
...
Sory my mistake for not being more explicit. The columns do not end at H7
but
at M7. From I7 to M7 they are zero values at present but may be calculated
at
any time. My apologies once again for not being more explicit.

Mike H reply above was the solution I was looking for.

sgl

"Gary''s Student" wrote:

Please explain...The last value in the range from B7 thru H7 will always
be
the contents of H7??
--
Gary''s Student - gsnu200838


"sgl" wrote:

I have the following formula results in a range B7:H7

B C D E F G H
10 25 0 12 0 13 17

I need a formula that will extract the last value in the range that is
"17".
These values are claculated from embeded formulas in each cell so even
though
columns D and F have a zero value they still have a formula in them

Many thanks/sgl



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default Last Value in a Range

"T. Valko" wrote...
For the rightmost number excluding zeros:

=LOOKUP(1E100,1/B7:M7,B7:M7)

Assumes there are no logical values (TRUE) in the range.

....

Why assume? Bypass 'em.

=LOOKUP(1E+300,B7:M7/(B7:M7<0)/(B7:M7<TRUE))
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 806
Default Last Value in a Range

Hello,

Why only bypassing TRUE logical values?

=LOOKUP(MAXNUM,B7:M7/(ISNUMBER(B7:M7)*NOT(ISBLANK(B7:M7))))

Set MAXNUM to 1e307 or something you can live with. If you really need
0 instead of blank cells (which I would prefer because a result COULD
be 0) to represent non-filled cells, substitute NOT(ISBLANK(B7:M7)) by
(B7:M7<0).

Regards,
Bernd
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
Cond. Format Data Bars of range based on values of another range alexmo Excel Worksheet Functions 4 January 16th 09 04:03 AM
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM
formula to sort a range so that it matches the exact rows of a column that is outside that range? steveo Excel Discussion (Misc queries) 1 June 18th 06 02:05 AM
How to count dates within a certain range in a column with mutiple date range entries Krisjhn Excel Worksheet Functions 2 September 1st 05 01:59 PM


All times are GMT +1. The time now is 02:47 AM.

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"