excel maxa

H

Harry

I want to highlite the highest number in each row. Some cells could be empty
at times.
Is it also posible to take that highest number and send to print or send to
another sheet with the name of the colum. (joe etc.)
joe bill tom sue mary
a 50 34 102 20 2
b 10 35 99 5 3
c 2 56 10 1
d 13 5 55
 
R

Roger Govier

Hi Harry

In H2 enter
=INDEX($1:$1,MATCH(MAX(A2:E2),A2:E2,0))
Copy down as required.

There is no way you can get a formula to send data to a printer or to
another sheet.
You could, on another Sheet say Sheet2, enter in A1
=Sheet1!H2
and copy down
 
D

Don Guillett

Copies from activesheet to sheet 4
Sub gethighest()
For i = 1 To Cells(1, Columns.Count).End(xlToLeft).Column
With Sheets("sheet4")
lr = .Cells(Rows.Count, i).End(xlUp).row
.Cells(1, i) = Cells(1, i)
.Cells(2, i) = Application.Max(Range(Cells(2, i), Cells(lr, i)))
End With
Next
End Sub
 
D

Don Guillett

Correction

Sub gethighest()
For i = 1 To Cells(1, Columns.Count).End(xlToLeft).Column
lr = Cells(Rows.Count, 1).End(xlUp).row
With Sheets("sheet4")
..Cells(1, i) = Cells(1, i)
..Cells(2, i) = Application.Max(Range(Cells(2, i), Cells(lr, i)))
End With
Next
End Sub
 
S

Steven

Actually, even though the formula itself cannot send data to a printer,
there's an easy way to print it out...

1. Add an additional column to the sheet called MAXIMUM.
2. Set the value of each cell to the maximum value of the other entries in
that row.
3. Select that column using Set Print Area.
4. Print!
 

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