Excel Tutorial

20120721

Rank If Passed



Sub Marks_rank()
Dim i As Integer
Dim k As String
For i = 2 To Sheet1.Range("B1048576").End(xlUp).Row
k = Application.WorksheetFunction.Rank(Cells(i, "B"), Range("B:B"), 0)
If Cells(i, "C") <> "Failed" Then
Cells(i, "D") = k
End If
Next
End Sub

Posted by Bharat at 10:10
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2017 (8)
    • ►  May (5)
    • ►  March (1)
    • ►  February (2)
  • ►  2013 (11)
    • ►  August (1)
    • ►  July (6)
    • ►  April (1)
    • ►  February (3)
  • ▼  2012 (112)
    • ►  November (2)
    • ►  October (3)
    • ►  September (4)
    • ►  August (88)
    • ▼  July (15)
      • ElseIf Structure
      • Multiple-line statements - Syntax
      • SpecialCells method to find Last Used Column in wo...
      • UsedRange method to find number of used columns in...
      • UsedRange method to find number of used rows in a ...
      • End(xlUp) method to determine Last Row with Data, ...
      • largest value in range
      • Smallest Value in Range
      • Remove Special Characters
      • Rank If Passed
      • Lookup If Blank
      • 3) Table 1 and 2 in different books and different ...
      • 2) Table 1 and 2 in different sheets.
      • 1) Table 1 and 2 same sheet.
      • Unique Desgnation
Picture Window theme. Powered by Blogger.