View Single Post
  #6   Report Post  
JMB
 
Posts: n/a
Default Last value & if,then

You're welcome. In retrospect, I would suggest using this slightly modified
version. The last one will result in an error if your table does not begin
in Row 1 (so if you move it or insert a row in cell A1 - the last formula
will result in error whereas this one would not). Sorry for the confusion.


=B1*INDEX($A$1:A1,MAX(ISNUMBER($A$1:A1)*(ROW(INDIR ECT("1:"&ROWS($A$1:A1))))))

"Angie A." wrote:

Hey- thanks a lot!
= )


"JMB" wrote:

One way

=B1*INDEX($A$1:A1,MAX(ISNUMBER($A$1:A1)*ROW($A$1:A 1)))

After you type it in, hit Control+Shift+Enter instead of just Enter as this
is an array formula. Then copy down column C


"Angie A." wrote:

Example

A B C
7 4 =$A$1*B1
5 =$A$1*B2
6 =$A$1*B3
3 1 =$A$4*B4
4 =$A$4*B5

Isn't there a way to tell Excel to always multiply A*B, without using the
$A$? The reason I ask is we have hundreds of sections with new A values and
I don't want to put a new $$ formula in for each section. I was thinking of
something along the lines of A*B, if A=blank use last A value- but I can't
find any examples of this.