Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting columns
I have a excel sheet with 5 columns (A,B,C,D,E). I want to write a macr to select column D and E and then change its font color. I have merge cells in Column A. What happens is that due to merged cells when write the statement columns ("D:E").select or Range("$D:$E").select it selects the whole sheet(from column A to column E). Could someon suggest a wayout to select column D and E only with merged cells i Column A. Thank ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting columns
You don't have to select cells to operate on them
programmatically. Just specify the ranges and then instruct what to do to/with them. If you only want to change the font colour in Columns D and E then don't select the cells. Just try: Columns("D:E").Font.ColorIndex = 3 This will exclude the merged range that intersects with Columns D and E. Regards, Greg -----Original Message----- I have a excel sheet with 5 columns (A,B,C,D,E). I want to write a macro to select column D and E and then change its font color. I have merged cells in Column A. What happens is that due to merged cells when i write the statement columns ("D:E").select or Range("$D:$E").select it selects the whole sheet(from column A to column E). Could someone suggest a wayout to select column D and E only with merged cells in Column A. Thanks ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selecting nonadjacent columns? | Excel Worksheet Functions | |||
Selecting different multiple columns | Excel Worksheet Functions | |||
selecting columns in a worksheet | Excel Worksheet Functions | |||
Selecting Columns | Excel Programming | |||
Selecting Multiple Columns | Excel Programming |