Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find Last Column, Select, and Bold
I don't know much about VBA - I usually search for snippets of code
that do what I want and then modify them as necessary. This seems to work alright for my needs, but then I get stuck on something that seems like it should be so obvious. Here's (hopefully) an easy one: I have a variable number of rows and columns in my spreadsheet. I need to be able to search for the last column with data in it, select that column, and then make all text bold, and the same for the last row with data in it. I'm able to do this successfully for my last row with: ActiveSheet.Cells(ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row, 1).Activate Selection.EntireRow.Font.Bold = True However, when I change "row" to "column" and "xlUp" to "xlToLeft", I get an error 424. ActiveSheet.Cells(ActiveSheet.Cells(Column.Count, "A").End(xlToLeft).Column, 1).Activate Selection.EntireColumn.Font.Bold = True I'm sure I'm missing something fairly obvious, but would appreciate any pointers. TIA, Yellowbird |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA: Column Select then Data Select then return to cell A1 | Excel Discussion (Misc queries) | |||
If date in column T is +7 then column C is Bold Red | Excel Discussion (Misc queries) | |||
how to select cells that are bold? | Excel Discussion (Misc queries) | |||
Auto BOLD max value in a column | Excel Worksheet Functions | |||
How to find a value then select that column | Excel Programming |