Using the functions "LARGE"and "SMALL" in an Excel program

E

Ed

I have a program which terminates with a variable length column of numbers.
In an adjacent cell I want to enter tha largest and in another cell I want
to enter the smallest of the numbers in the rsulting column.

The column name is the variable "tstC" the topmost row in the column will be
"3" and the endmost row will the variable "s".

Among others thoughts, I've tried:
Cells(3, conC) = "=LARGE(Range(cells(3, tstC), cells(s, tstC)),1)" and

Cells(3, conC).Select
ActiveCell.FormulaR1C1 = "=LARGE(RC[-1]:R[s-3]C[-1],1)"

and none worked.

Can someone please help me out?

Thanks.
 
B

Bob Phillips

Cells(3, conC) = "=LARGE(" & Range(cells(3, tstC), cells(s, tstC)).Address
& ",1)"

or

Cells(3, conC).FormulaR1C1 = "=LARGE(R3C" & tstC & R" & s & "C" & tstC &
",1)"


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
E

Ed

Bob thanks very much for your help

Ed


Bob Phillips said:
Cells(3, conC) = "=LARGE(" & Range(cells(3, tstC), cells(s, tstC)).Address
& ",1)"

or

Cells(3, conC).FormulaR1C1 = "=LARGE(R3C" & tstC & R" & s & "C" & tstC &
",1)"


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my
addy)



Ed said:
I have a program which terminates with a variable length column of
numbers. In an adjacent cell I want to enter tha largest and in another
cell I want to enter the smallest of the numbers in the rsulting column.

The column name is the variable "tstC" the topmost row in the column will
be "3" and the endmost row will the variable "s".

Among others thoughts, I've tried:
Cells(3, conC) = "=LARGE(Range(cells(3, tstC), cells(s, tstC)),1)" and

Cells(3, conC).Select
ActiveCell.FormulaR1C1 = "=LARGE(RC[-1]:R[s-3]C[-1],1)"

and none worked.

Can someone please help me out?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top