Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Need to write function that will change column width based on a condition
Subject says it all, is this a VBA thing or some function I have yet
to discover in the function list. I have no idea how to write this in VBA. If anyone has any ideas I'd greatly appreciate it. Thanks, Will |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Need to write function that will change column width based on a condition
Functions, even user defined functions, can only return values to their
calling cells. They can't change cell or worksheet formatting. You may be able to do what you want with an event macro, but how to implement it would depend on the condition you want to use. In article . com, "dunlapww" wrote: Subject says it all, is this a VBA thing or some function I have yet to discover in the function list. I have no idea how to write this in VBA. If anyone has any ideas I'd greatly appreciate it. Thanks, Will |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Need to write function that will change column width based on a co
You can't change column width inside a function. Only a macro will do it
which means you have either manual activate it or have it in a Worksheet_Change() macro. Sub Worksheet_Change(Target as Range) if target < 1000 then Target.ColumnWidth = 15 end if end sub "dunlapww" wrote: Subject says it all, is this a VBA thing or some function I have yet to discover in the function list. I have no idea how to write this in VBA. If anyone has any ideas I'd greatly appreciate it. Thanks, Will |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Counting entries in column based on condition in another column | Excel Worksheet Functions | |||
Based on a condition in one column, search for a year in another column, and display data from another column in the same row look | Excel Discussion (Misc queries) | |||
Change row color based on condition of celss | Excel Worksheet Functions | |||
help me getting value of column based on condition | Excel Worksheet Functions | |||
Color Change in chart based of condition | Charts and Charting in Excel |