ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   .FontSize conditionally (https://www.excelbanter.com/excel-worksheet-functions/123651-fontsize-conditionally.html)

John C

.FontSize conditionally
 
I have cells that are conditionally formatted as follows:
=$D6=VLOOKUP($B6,irr_goals,2)
Bold, Underline


I want these cells to increase the fontsize to 10 under the same conditions.
Does anybody know why Microsoft has the Font option Greeked out??

Even more important, can somebody tell me how to make this work...I know
there is a .fontsize parameter in code so it stands to reason that this can
be done, but I don't know VBScript.

Please Help

John Bundy

.FontSize conditionally
 
This site has been recommended several times:

http://www.xldynamic.com/source/xld.....Download.html

Talks about you issue in the first section. Let me know how it works if you
use it.
--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


"John C" wrote:

I have cells that are conditionally formatted as follows:
=$D6=VLOOKUP($B6,irr_goals,2)
Bold, Underline


I want these cells to increase the fontsize to 10 under the same conditions.
Does anybody know why Microsoft has the Font option Greeked out??

Even more important, can somebody tell me how to make this work...I know
there is a .fontsize parameter in code so it stands to reason that this can
be done, but I don't know VBScript.

Please Help


Gord Dibben

.FontSize conditionally
 
Note: CFPlus will allow Font Size changes in Condtional Formatting unlike the
Excel default CF.


Gord Dibben MS Excel MVP

On Sat, 23 Dec 2006 10:31:01 -0800, John Bundy remove
X''''''''''''''''s wrote:

This site has been recommended several times:

http://www.xldynamic.com/source/xld.....Download.html

Talks about you issue in the first section. Let me know how it works if you
use it.



John C

.FontSize conditionally
 
This appears to solve my problem but I can't test it until I get permission
from corporate to download the add-in (ahahaha). It will solve my problem as
long as the following condition is true:

If I download the Add-in, and use it to conditionally format the font size,
it has to embed vbscript so that any excel computer can process the results
without having to download the add-in. It is not feasible for me to put the
add-in on all of the computers that need this report.

I don't see how else an add-in could work though, so assuming that this is
indeed the case then you guys solved my problem. I will post any further
questions that may stem from this, and thank you for the help.

"John Bundy" wrote:

This site has been recommended several times:

http://www.xldynamic.com/source/xld.....Download.html

Talks about you issue in the first section. Let me know how it works if you
use it.
--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


"John C" wrote:

I have cells that are conditionally formatted as follows:
=$D6=VLOOKUP($B6,irr_goals,2)
Bold, Underline


I want these cells to increase the fontsize to 10 under the same conditions.
Does anybody know why Microsoft has the Font option Greeked out??

Even more important, can somebody tell me how to make this work...I know
there is a .fontsize parameter in code so it stands to reason that this can
be done, but I don't know VBScript.

Please Help


Gord Dibben

.FontSize conditionally
 
If all you want to do is increase the font size for Conditionally Formatted
cells only you could run a macro.

Sub Font_Increase()
With ActiveSheet.UsedRange.SpecialCells _
(xlCellTypeAllFormatConditions)
.Font.Size = 10
End With
End Sub

Or tie it to calculate event code.

Private Sub Worksheet_Calculate()
With ActiveSheet.UsedRange.SpecialCells _
(xlCellTypeAllFormatConditions)
.Font.Size = 10
End With
End Sub


Gord Dibben MS Excel MVP

On Sat, 23 Dec 2006 11:56:01 -0800, John C
wrote:

This appears to solve my problem but I can't test it until I get permission
from corporate to download the add-in (ahahaha). It will solve my problem as
long as the following condition is true:

If I download the Add-in, and use it to conditionally format the font size,
it has to embed vbscript so that any excel computer can process the results
without having to download the add-in. It is not feasible for me to put the
add-in on all of the computers that need this report.

I don't see how else an add-in could work though, so assuming that this is
indeed the case then you guys solved my problem. I will post any further
questions that may stem from this, and thank you for the help.

"John Bundy" wrote:

This site has been recommended several times:

http://www.xldynamic.com/source/xld.....Download.html

Talks about you issue in the first section. Let me know how it works if you
use it.
--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


"John C" wrote:

I have cells that are conditionally formatted as follows:
=$D6=VLOOKUP($B6,irr_goals,2)
Bold, Underline

I want these cells to increase the fontsize to 10 under the same conditions.
Does anybody know why Microsoft has the Font option Greeked out??

Even more important, can somebody tell me how to make this work...I know
there is a .fontsize parameter in code so it stands to reason that this can
be done, but I don't know VBScript.

Please Help



John C

.FontSize conditionally
 
OK This looks like what I need but how do I embed this to work automatically?
I have the cells with Conditional FormattingFunction Is
=$D6=VLOOKUP($B6,irr_goals,2,false)
BOLD, UNDERLINE


Where within all of that would I put the font_increase() function to make
the cell value appear as font size 10?

"Gord Dibben" wrote:

If all you want to do is increase the font size for Conditionally Formatted
cells only you could run a macro.

Sub Font_Increase()
With ActiveSheet.UsedRange.SpecialCells _
(xlCellTypeAllFormatConditions)
.Font.Size = 10
End With
End Sub

Or tie it to calculate event code.

Private Sub Worksheet_Calculate()
With ActiveSheet.UsedRange.SpecialCells _
(xlCellTypeAllFormatConditions)
.Font.Size = 10
End With
End Sub


Gord Dibben MS Excel MVP

On Sat, 23 Dec 2006 11:56:01 -0800, John C
wrote:

This appears to solve my problem but I can't test it until I get permission
from corporate to download the add-in (ahahaha). It will solve my problem as
long as the following condition is true:

If I download the Add-in, and use it to conditionally format the font size,
it has to embed vbscript so that any excel computer can process the results
without having to download the add-in. It is not feasible for me to put the
add-in on all of the computers that need this report.

I don't see how else an add-in could work though, so assuming that this is
indeed the case then you guys solved my problem. I will post any further
questions that may stem from this, and thank you for the help.

"John Bundy" wrote:

This site has been recommended several times:

http://www.xldynamic.com/source/xld.....Download.html

Talks about you issue in the first section. Let me know how it works if you
use it.
--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


"John C" wrote:

I have cells that are conditionally formatted as follows:
=$D6=VLOOKUP($B6,irr_goals,2)
Bold, Underline

I want these cells to increase the fontsize to 10 under the same conditions.
Does anybody know why Microsoft has the Font option Greeked out??

Even more important, can somebody tell me how to make this work...I know
there is a .fontsize parameter in code so it stands to reason that this can
be done, but I don't know VBScript.

Please Help




Gord Dibben

.FontSize conditionally
 
John

To work automatically you would use the second set of code which is event code.

Right-click on the sheet tab and "View Code"

Copy/paste the Private Sub Worksheet_Calculate() code into that module.

Whenever the sheet calculates, the CF cells will update with fontsize of 10.

Leave your BOLD, UNDERLINE CF as is.

Note: as written the code looks for CF cells in the used range.

If you wish to narrow that range you could change the code to

Private Sub Worksheet_Calculate()
With ActiveSheet.Range("A1:C50").SpecialCells _
(xlCellTypeAllFormatConditions)
.Font.Size = 10
End With
End Sub


Gord

On Sat, 23 Dec 2006 21:14:00 -0800, John C
wrote:

OK This looks like what I need but how do I embed this to work automatically?
I have the cells with Conditional FormattingFunction Is
=$D6=VLOOKUP($B6,irr_goals,2,false)
BOLD, UNDERLINE


Where within all of that would I put the font_increase() function to make
the cell value appear as font size 10?

"Gord Dibben" wrote:

If all you want to do is increase the font size for Conditionally Formatted
cells only you could run a macro.

Sub Font_Increase()
With ActiveSheet.UsedRange.SpecialCells _
(xlCellTypeAllFormatConditions)
.Font.Size = 10
End With
End Sub

Or tie it to calculate event code.

Private Sub Worksheet_Calculate()
With ActiveSheet.UsedRange.SpecialCells _
(xlCellTypeAllFormatConditions)
.Font.Size = 10
End With
End Sub


Gord Dibben MS Excel MVP

On Sat, 23 Dec 2006 11:56:01 -0800, John C
wrote:

This appears to solve my problem but I can't test it until I get permission
from corporate to download the add-in (ahahaha). It will solve my problem as
long as the following condition is true:

If I download the Add-in, and use it to conditionally format the font size,
it has to embed vbscript so that any excel computer can process the results
without having to download the add-in. It is not feasible for me to put the
add-in on all of the computers that need this report.

I don't see how else an add-in could work though, so assuming that this is
indeed the case then you guys solved my problem. I will post any further
questions that may stem from this, and thank you for the help.

"John Bundy" wrote:

This site has been recommended several times:

http://www.xldynamic.com/source/xld.....Download.html

Talks about you issue in the first section. Let me know how it works if you
use it.
--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


"John C" wrote:

I have cells that are conditionally formatted as follows:
=$D6=VLOOKUP($B6,irr_goals,2)
Bold, Underline

I want these cells to increase the fontsize to 10 under the same conditions.
Does anybody know why Microsoft has the Font option Greeked out??

Even more important, can somebody tell me how to make this work...I know
there is a .fontsize parameter in code so it stands to reason that this can
be done, but I don't know VBScript.

Please Help




Gord Dibben MS Excel MVP


All times are GMT +1. The time now is 04:00 AM.

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