View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Epinn Epinn is offline
external usenet poster
 
Posts: 605
Default Last value in row

Bob,

I don't feel comfortable with my formula.

From Excel Help for Index function:-

"If array contains only one row or column, the corresponding row_num or column_num argument is optional."

What does "optional" really mean? I don't even have to place a comma where the syntax asks for row number in my formula? Not sure why my formula works.

GMW,

FYI http://office.microsoft.com/en-us/ma...444281033.aspx

Epinn

"Epinn" wrote in message ...
I have stock symbol in column A. Stock price starts from column B.

Last value: Same as Bob's.

First value/stock price

{=INDEX(1:1,MATCH(TRUE,(ISNUMBER(1:1)),0))} array formula i.e. ctrl+shift+enter

I have to use ISNUMBER because column A is a stock symbol which is text in North America. If the stock symbol is number, then I have to come up with a different formula.

This formula seems to be okay if certain stock price columns are left blank or inadvertently have text. The first stock price doesn't have to be in column B. If the first value *always* starts in column B, I may just hardcode column B in the formula to calculate percentage.

Bob or anyone, please correct me if I am wrong.

Epinn

"Bob Phillips" wrote in message ...
Last value

=LOOKUP(2,1/ISNUMBER(1:1),1:1)

This array formula gets the first entry

=MATCH(TRUE,1:1<"",0)

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"GMW" wrote in message
...
I'm tracking stock prices, and enter daily closing prices for stock
symbols
listed in a column. Each row contains daily closing prices. The final
column (once I've got the formula sorted out) is the %age change from the
first value in the row.

How do I designate the last value entered, divided by the first value in
that row? After specifying the first value in the row, End Right seems to
go
to the last entered value in that row. How do I enter a formula in the
Percentage Change column to divide the last value in the row by the first
value in that row (-1)?