#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with formula for bolding font Roger Excel Worksheet Functions 3 December 5th 07 04:08 PM
Bolding when subtotalling mrsteve1 Excel Worksheet Functions 2 February 17th 05 11:26 PM
Bolding with formulas and "if/thens" Abi Excel Worksheet Functions 4 January 11th 05 10:44 PM
Bolding problem on Subtotals CLR Excel Programming 2 September 19th 04 07:00 PM
Bolding specific text Scot Rundell Excel Programming 2 September 15th 03 07:20 AM


All times are GMT +1. The time now is 05:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"