Rx_
Nothing In Moderation
- Local time
- Today, 07:22
- Joined
- Oct 22, 2009
- Messages
- 2,803
Part 2 of the question
1. This is the base code that bolds a cell value if it changes in a sorted column.
I.E. : values such as Customer Name are sorted, every time a new customer name is in the list - the cell is bolded:
For Each c In ActiveWindow.Selection
If c.Value <> c.Offset(-1, 0).Value Then
c.Font.FontStyle = "Bold"
End If
Next c
2. Now, the customer requested that selected columns are also bolded.
i.E. A changed customer name is bolded from above.
While at the c.Font.FontStyle = "Bold" for a value of C.Value
go over 5 columns and bold the next three cells on the same row.
Had this code somewhere and can't seem to find it.
Jones 1 2 3 4 5 Tall Ok Medium
Jones 1 2 3 4 5 Tall Ok Medium
Jones 1 2 3 4 5 Tall Ok Medium
Kline 1 2 3 4 5 Tall Ok Medium
Kline 1 2 3 4 5 Tall Ok Medium
Kline 1 2 3 4 5 Tall Ok Medium
AND:
While on the subject
Might as well ask about bolding an entire row.
Someone will probably be looking for that answer later too.
1. This is the base code that bolds a cell value if it changes in a sorted column.
I.E. : values such as Customer Name are sorted, every time a new customer name is in the list - the cell is bolded:
For Each c In ActiveWindow.Selection
If c.Value <> c.Offset(-1, 0).Value Then
c.Font.FontStyle = "Bold"
End If
Next c
2. Now, the customer requested that selected columns are also bolded.
i.E. A changed customer name is bolded from above.
While at the c.Font.FontStyle = "Bold" for a value of C.Value
go over 5 columns and bold the next three cells on the same row.
Had this code somewhere and can't seem to find it.
Jones 1 2 3 4 5 Tall Ok Medium
Jones 1 2 3 4 5 Tall Ok Medium
Jones 1 2 3 4 5 Tall Ok Medium
Kline 1 2 3 4 5 Tall Ok Medium
Kline 1 2 3 4 5 Tall Ok Medium
Kline 1 2 3 4 5 Tall Ok Medium
AND:
While on the subject
Might as well ask about bolding an entire row.
Someone will probably be looking for that answer later too.
Last edited: