Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Formula for Last Cell in a Row with a Value

You are right. See my latest response to the OP for a revised formula.

--
Rick (MVP - Excel)


"JMB" wrote in message
...
A possible issue could be if the last value in row 3 is duplicated earlier
in
that row. Match will return the location of the first instance.

Unless I am misunderstanding something, can it be simplified to:
=LOOKUP(2,1/(3:3<""),1:1)

Maybe change the <"" to 0 if that works better for the OP.

"Rick Rothstein (MVP - VB)" wrote:

The following formula will return the cell value in Row 1 (assumed header
row) for the last cell that has data in Row 3...

=INDEX($1:$1,1,MATCH(LOOKUP(2,1/(3:3<""),3:3),3:3,0))

Change the three occurrences of 3:3 to whatever row you want (for
example,
change them to 5:5 for Row 5). This formula can be copied down if
required.

Rick


"cardan" wrote in message
...
Hello all,

I am working on some cash flows and I am trying to find a formula that
will return the month with the last value in it.
For example; I have a header row with 24 "months" in it. (each cell
equals a sequential month, year) below that I have a set of cash
flows. These cash flows can either go out 2 months, 15 months, 24
months, etc..) I am trying to write a one-cell formula that will find
the last month with a value and then return the month (the header). I
have a formula that looks in the column above and looks at the sum of
the remaining months. It looks something like this.
=IF(AND(above cashflow0,SUM(above cashflow-over 1:end
cashflow)=0),date,"-")

This works, however, I have to have create another row to calculate
every cell. I would like to just have one cell to tell me the last
month. Is this possible?

Thank you for you time.

Cheers,

Dan




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 can I make a blank cell in a formula cell with a range of cell Vi Excel Discussion (Misc queries) 5 June 21st 07 02:46 PM
Subtract cell formula from existing cell formula [email protected] Excel Programming 2 December 12th 06 12:03 PM
get the value of a formula in cell B1 into cell A1 without changing my current cell selection News[_4_] Excel Programming 3 October 21st 06 12:24 AM
Cell Formula reference to cell Based On third Cell Content Gabriel Excel Discussion (Misc queries) 0 February 11th 05 05:35 AM
Question: Cell formula or macro to write result of one cell to another cell Frederik Romanov Excel Programming 1 July 8th 03 03:03 PM


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