ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Bolding (https://www.excelbanter.com/excel-programming/312033-bolding.html)

Dale[_12_]

Bolding
 
I have a list with peoples names and then in the adjacent
colums following that I have numbers, with a total at the
end. How can I run a macro that will go through the list
of totals and bold the highest totals?

Norman Jones

Bolding
 
Hi Dale,

You may be able to use conditional formatting, using the Large or Max
worksheet functions as your trigger.

---
Regards,
Norman



"Dale" wrote in message
...
I have a list with peoples names and then in the adjacent
colums following that I have numbers, with a total at the
end. How can I run a macro that will go through the list
of totals and bold the highest totals?




Tom Ogilvy

Bolding
 
You want one cell bolded in each row

Sub BBB()
Dim rng As Range, rng1 As Range, res As Variant
Set rng = Range(Cells(2, 1), Cells(Rows.Count, 1).End(xlUp))
For Each cell In rng
Set rng1 = cell.Offset(0, 1).Resize(1, 255)
res = Application.Match(Application.Max(rng1), rng1, 0)
rng1(1, res).Font.Bold = True
Next

End Sub

--
Regards,
Tom Ogilvy

"Dale" wrote in message
...
I have a list with peoples names and then in the adjacent
colums following that I have numbers, with a total at the
end. How can I run a macro that will go through the list
of totals and bold the highest totals?





All times are GMT +1. The time now is 10:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com