View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
puiuluipui puiuluipui is offline
external usenet poster
 
Posts: 468
Default Return last cell in range

Works Great!
Thanks!

"Chip Pearson" a scris:

You can use the following array formula. It will return the value of
the right-most non-blank cell in the range P4:BM4.

=OFFSET(P4,0,MAX(COLUMN(P4:BM4)*(P4:BM4<""))-COLUMN(P4),1,1)

Since this is an Array Formula, you *must* press CTRL SHIFT ENTER
rather than just ENTER when you first enter the formula
and whenever you edit it later. If you do this properly,
Excel will display the formula in the Formula Bar enclosed
in curly braces { }. (You do not type the curly braces -
Excel includes them automatically.) The formula will not work
properly if you do not use CTRL SHIFT ENTER. See
http://www.cpearson.com/excel/ArrayFormulas.aspx for lots
more information about array formulas.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Fri, 17 Apr 2009 04:33:01 -0700, puiuluipui
wrote:

Hi, i need in "F4" a formula that return the last written cell from "P4:BM4"

Can this be done?
Thanks!