Yellowbird
Tom's post explained why your original code failed whereas my post attempted
to provide a solution to what you were attempting to do. The code I
suggested assumes your first row of data is in row 1. If this is not the
case and your first row is, say, row 3, then you would need to amend the
first line of code. The resultant sub would be....
Sub MakeBold()
With ActiveSheet
..Cells.Font.Bold = False
'Assuming row 3 is the first row of data
..Range("IV3").End(xlToLeft).EntireColumn.Font.Bol d = True
..Range("A" & Rows.Count).End(xlUp).EntireRow.Font.Bold = True
End With
End Sub
--
XL2002
Regards
William
"Yellowbird" wrote in message
om...
| Thanks, William and Tom.
|
| Unfortunately, both of these solutions still bold column A, not the
| last column in the worksheet.
|
| Seems like we're on the right track, but need to be able to find the
| last column (which is variable - happens to be FO in this worksheet,
| EA in the next, etc.) and bold that.
|
| I tried changing the various values, but still can't seem to select
| the last column with data.
|
| Any additional suggestions appreciated.
|
| TIA,
| Yellowbird
|
|
|
| "Tom Ogilvy" wrote in message
...
| William provided a good solution - as to your problem, you replaced
| rows.count with columns.count, but it is being supplied as the rows
argument
| and the column remains "A". So you would need to do this:
|
| ActiveSheet.Cells(1,ActiveSheet.Cells(1,Columns. _
| Count).End(xlToLeft).Column).Activate
| Selection.EntireColumn.Font.Bold = True
|
| --
| Regards,
| Tom Ogilvy
|