Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88835

Bold Top 50% of the summed values in Column E and their rows

$
0
0

After seeking help in stackoverflow, I came back with the skeleton of the vba codes (still not working though), however it is not generating the outcome that I desire.

Sub Highlight_Top50()

    Dim CheckRange As range

    Set CheckRange = range("E2:E", Cells(Rows.Count, "E").End(xlUp)).Row

    Selection.FormatConditions.AddTop10
    Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
    With Selection.FormatConditions(1)
    .TopBottom = xlTop10Top
    .Rank = 50
    .Percent = True
    End With

    With Selection.FormatConditions(1).Font.Bold = True

    End With

    Selection.FormatConditions(1).StopIfTrue = False

End Sub

Under Conditional Formatting, there's no such rule as "Highlight Top 50% of the summed value". The nearest Excel provides is "Format cells that rank in Top: x%".


Viewing all articles
Browse latest Browse all 88835

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>