View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Beginner VBA question

light,

One way:

With ActiveCell
Range(.Cells(1, 1), .Cells(1, 0).End(xlDown)(1, 2)).Formula = _
"=RANK(" & .Cells(1, 0).Address(False, False) & ", " & _
Range(.Cells(1, 0), .Cells(1, 0).End(xlDown)).Address & ")"
End With

HTH,
Bernie
MS Excel MVP

"light" wrote in message
...

Trying to rank the column on the left with this formula:

ActiveCell.FormulaR1C1 =
"=RANK(RC[-1],RC[-1]:selection.End(xlDown).Select,0)"

Can someone tell me how to write this properly.


--
light
------------------------------------------------------------------------
light's Profile:

http://www.excelforum.com/member.php...fo&userid=7228
View this thread: http://www.excelforum.com/showthread...hreadid=276870