ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Refer to column width in conditional formatting (https://www.excelbanter.com/excel-discussion-misc-queries/157278-refer-column-width-conditional-formatting.html)

sammy

Refer to column width in conditional formatting
 
Hi All,

I would like to refer to the cell's column width in a conditional formatting
"Formula Is" statement, something like

=columnwidth<5

Can this be done?

Thanks,

Sammy

T. Valko

Refer to column width in conditional formatting
 
Try this:

=CELL("width",A1)<5

Note that changing a columns width does not trigger a calculation. You might
have a column width of 8 and change it to 4 but the formatting won't be
applied until a calculation takes place.

--
Biff
Microsoft Excel MVP


"sammy" wrote in message
...
Hi All,

I would like to refer to the cell's column width in a conditional
formatting
"Formula Is" statement, something like

=columnwidth<5

Can this be done?

Thanks,

Sammy




Dave Peterson

Refer to column width in conditional formatting
 
With column A the column you care about:

=CELL("width",a1)<5

But this didn't recalculate when I changed the columnwidth manually. Excel had
to do one more calculation.

sammy wrote:

Hi All,

I would like to refer to the cell's column width in a conditional formatting
"Formula Is" statement, something like

=columnwidth<5

Can this be done?

Thanks,

Sammy


--

Dave Peterson

sammy

Refer to column width in conditional formatting
 
Thanks Biff,

This is what i wanted.

"T. Valko" wrote:

Try this:

=CELL("width",A1)<5

Note that changing a columns width does not trigger a calculation. You might
have a column width of 8 and change it to 4 but the formatting won't be
applied until a calculation takes place.

--
Biff
Microsoft Excel MVP


"sammy" wrote in message
...
Hi All,

I would like to refer to the cell's column width in a conditional
formatting
"Formula Is" statement, something like

=columnwidth<5

Can this be done?

Thanks,

Sammy





T. Valko

Refer to column width in conditional formatting
 
You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"sammy" wrote in message
...
Thanks Biff,

This is what i wanted.

"T. Valko" wrote:

Try this:

=CELL("width",A1)<5

Note that changing a columns width does not trigger a calculation. You
might
have a column width of 8 and change it to 4 but the formatting won't be
applied until a calculation takes place.

--
Biff
Microsoft Excel MVP


"sammy" wrote in message
...
Hi All,

I would like to refer to the cell's column width in a conditional
formatting
"Formula Is" statement, something like

=columnwidth<5

Can this be done?

Thanks,

Sammy








All times are GMT +1. The time now is 12:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com