Is it possible to change the width of a column with a formula? For example, if a cell is empty, I want to make its column width zero, but if the cell contains data, I want to make its width something other than zero.
Any help would be appreciated!
Is it possible to change the width of a column with a formula? For example, if a cell is empty, I want to make its column width zero, but if the cell contains data, I want to make its width something other than zero.
Any help would be appreciated!
Hi Rick, and welcome to the forum.
This can be done via a macro on the Worksheet_Change event, however it seems messy to me especially if multiple columns might result in 0 based on a user change. I'd recommend uploading a sample worksheet with sample data and how it looks before and after a value change.
Thanks for the welcome, Paul
I have attached a sample file, and here are some screenshots of what I'm trying to do. Perhaps there is another way of accomplishing what I want to do other than changing the width of the column, so if you know of any, let me know
Here is a screenshot of the sample data set:
\1
I am maintaining the database on Sheet 1, and on Sheet 2, I am displaying just the names that have a number greater than zero in 'Days Late' (I am deriving this information using the formula =IF(Sheet1!B2>0, Sheet1!B1, "") copied across all the cells):
\1
However, I want Sheet 2 to look like this:
\1
I thought it might be easiest to do using column widths, however, if there is another way, that'd be cool too![]()
If you are open to a change in your sheet structure then you could accomplish this very easily using AutoFilter.
To do this you would need your names and values going down the columns instead of across the rows. It would only be a matter of filtering on rows where the value is greater than zero.
YES! That worked GREAT!! Thanks Palmetto!
![]()
![]()
![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks