need help with excel formula

P

Pat

I need a formula that determines which value to accept: I want:

If A7>A1, then A7; but if A7<A1, then A1

I've been fooling with it for hours. Can you help?
 
E

Elkar

You could use the MAX function. It will return the largest value.

=MAX(A1,A7)

You could also use an IF function.

=IF(A7>A1,A7,A1)

HTH,
Elkar
 
P

Pat

Thank you! One more quick question: I need to hold one of the cells (A1)
constant in the formula so I can copy it throughout the worksheet. I know
you can use a "#" sign somewhere within the formula to make this happen.
Where do I put it?
 
E

Elkar

Actually, it's the $ symbol.

$A$1 will cause A1 to remain unchanged when copied. $A1 would cause only
the column portion of A1 to remain unchanged. And likewise, A$1 would cause
only the row portion of A1 to remain unchanged.

HTH,
Elkar
 
T

Toppers

$A$1 will keep the reference to A1 as a "constant" (or "absolute" to use the
correct teminology) address.

HTH
 
D

daddylonglegs

It's a $ sign. Try

=MAX($A$1,A7)

Pat said:
Thank you! One more quick question: I need to hold one of the cells (A1)
constant in the formula so I can copy it throughout the worksheet. I know
you can use a "#" sign somewhere within the formula to make this happen.
Where do I put it?
 
Top