Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Coloring Cell Font based on Cell Contents

I create alot of financial models at work and I typically use the
following font color codes so that I can better audit the model later.

Row & Column Headings Always Black

Blue: Hard Number Input
Black: Calculation
Green: Hard Number Input used as a driver of the model
Purple: Link to another sheet or workbook
Red: Formula and a hard input number in it. Example (=A1 + 5)

I am trying to figure out a way to create a function that either always
updates based on they type of input in a cell or that I can just use a
shortcut key that goes throught the sheet to update all the cells. I
currently define a name called FormulaInCell
=GET.CELL(48,INDIRECT("rc",FALSE))and then just select all cells and
use conditional formatting to make that black and it colors all
formulas black. However I would like it to be more robust so that it
covers the situations mentioned above. There must be a way to do it,
but I just can't seem to figure one out. Any help is greatly
appreciated.

Will

As an example:
2001 2002 2003 2004E 2005E
Sales 100.0 110.0 120.0 129.0 137.4
Sales Growth 7.0% 10.0% 9.1% 7.5% 6.5%
Profit 52.0 53.0 58.0 60.6 63.9
Profit Margin 52.0% 48.2% 48.3% 47.0% 46.5%

In this model:
2001-2003 Sales are Blue because they are hard coded inputs
2001-2003 Growth is Black because it is a formula
2001-2003 Profit is Purple because it is linked from another sheet
2001-2003 Profit Margin is Black because it is a formula

2004E-2005E sales are black and calculated as
previous years sales * (1+ sales growth)
2004E-2005E Growth is hardcoded, but green because it drives the sales
number
2004E-2005E Profit is Black and calculated as Sales * Profit Margin
2004E-2005E Profit Margin is Red Because it is calculated as the
previous years profit margin + .1%

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Coloring Cell Font based on Cell Contents

Bump - Anyone?


wrote:
I create alot of financial models at work and I typically use the
following font color codes so that I can better audit the model

later.

Row & Column Headings Always Black

Blue: Hard Number Input
Black: Calculation
Green: Hard Number Input used as a driver of the model
Purple: Link to another sheet or workbook
Red: Formula and a hard input number in it. Example (=A1 + 5)

I am trying to figure out a way to create a function that either

always
updates based on they type of input in a cell or that I can just use

a
shortcut key that goes throught the sheet to update all the cells. I
currently define a name called FormulaInCell
=GET.CELL(48,INDIRECT("rc",FALSE))and then just select all cells and
use conditional formatting to make that black and it colors all
formulas black. However I would like it to be more robust so that it
covers the situations mentioned above. There must be a way to do it,
but I just can't seem to figure one out. Any help is greatly
appreciated.

Will

As an example:
2001 2002 2003 2004E 2005E
Sales 100.0 110.0 120.0 129.0 137.4
Sales Growth 7.0% 10.0% 9.1% 7.5% 6.5%
Profit 52.0 53.0 58.0 60.6 63.9
Profit Margin 52.0% 48.2% 48.3% 47.0% 46.5%

In this model:
2001-2003 Sales are Blue because they are hard coded inputs
2001-2003 Growth is Black because it is a formula
2001-2003 Profit is Purple because it is linked from another sheet
2001-2003 Profit Margin is Black because it is a formula

2004E-2005E sales are black and calculated as
previous years sales * (1+ sales growth)
2004E-2005E Growth is hardcoded, but green because it drives the

sales
number
2004E-2005E Profit is Black and calculated as Sales * Profit Margin
2004E-2005E Profit Margin is Red Because it is calculated as the
previous years profit margin + .1%


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Coloring Cell Font based on Cell Contents

I sort of assume you don't have a template but build each new sheet roughly
along similar lines. What I don't understand is why, having done that,
anything changes except new inputs but only into pre determined cells.

If it's simply a matter of formatting a newly constructed sheet, maybe Name
all your sections, then in code something like

Range("HardNumberInput").Font.ColorIndex = 5

If you have similar sheets in the same workbook, probably better to use
Worksheet-Level names. This way each sheet can use same names referring to
ranges on their own sheets. Define like this:
Sheetname!HardNumberInput (note the ! Also may need to embrace sheetname
with apostrophes if sheetname includes certain characters)

Providing the sheet is active when you run your code, you don't need to
qualify with the defined name with sheetname.

To find and selecting formulas, record a macro, press F5, specialcells,
formulas.
Links to other sheets a bit harder. But if you know where these are already
no problem if you Define as suggested above.

Regards,
Peter T

wrote in message
oups.com...
I create alot of financial models at work and I typically use the
following font color codes so that I can better audit the model later.

Row & Column Headings Always Black

Blue: Hard Number Input
Black: Calculation
Green: Hard Number Input used as a driver of the model
Purple: Link to another sheet or workbook
Red: Formula and a hard input number in it. Example (=A1 + 5)

I am trying to figure out a way to create a function that either always
updates based on they type of input in a cell or that I can just use a
shortcut key that goes throught the sheet to update all the cells. I
currently define a name called FormulaInCell
=GET.CELL(48,INDIRECT("rc",FALSE))and then just select all cells and
use conditional formatting to make that black and it colors all
formulas black. However I would like it to be more robust so that it
covers the situations mentioned above. There must be a way to do it,
but I just can't seem to figure one out. Any help is greatly
appreciated.

Will

As an example:
2001 2002 2003 2004E 2005E
Sales 100.0 110.0 120.0 129.0 137.4
Sales Growth 7.0% 10.0% 9.1% 7.5% 6.5%
Profit 52.0 53.0 58.0 60.6 63.9
Profit Margin 52.0% 48.2% 48.3% 47.0% 46.5%

In this model:
2001-2003 Sales are Blue because they are hard coded inputs
2001-2003 Growth is Black because it is a formula
2001-2003 Profit is Purple because it is linked from another sheet
2001-2003 Profit Margin is Black because it is a formula

2004E-2005E sales are black and calculated as
previous years sales * (1+ sales growth)
2004E-2005E Growth is hardcoded, but green because it drives the sales
number
2004E-2005E Profit is Black and calculated as Sales * Profit Margin
2004E-2005E Profit Margin is Red Because it is calculated as the
previous years profit margin + .1%



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Coloring Cell Font based on Cell Contents

The example I gave was extremely simple and most models are built from
scratch with different inputs. I guess it is just something that is
much more difficult than I had expected.

Thanks

Peter T wrote:
I sort of assume you don't have a template but build each new sheet

roughly
along similar lines. What I don't understand is why, having done

that,
anything changes except new inputs but only into pre determined

cells.

If it's simply a matter of formatting a newly constructed sheet,

maybe Name
all your sections, then in code something like

Range("HardNumberInput").Font.ColorIndex = 5

If you have similar sheets in the same workbook, probably better to

use
Worksheet-Level names. This way each sheet can use same names

referring to
ranges on their own sheets. Define like this:
Sheetname!HardNumberInput (note the ! Also may need to embrace

sheetname
with apostrophes if sheetname includes certain characters)

Providing the sheet is active when you run your code, you don't need

to
qualify with the defined name with sheetname.

To find and selecting formulas, record a macro, press F5,

specialcells,
formulas.
Links to other sheets a bit harder. But if you know where these are

already
no problem if you Define as suggested above.

Regards,
Peter T

wrote in message
oups.com...
I create alot of financial models at work and I typically use the
following font color codes so that I can better audit the model

later.

Row & Column Headings Always Black

Blue: Hard Number Input
Black: Calculation
Green: Hard Number Input used as a driver of the model
Purple: Link to another sheet or workbook
Red: Formula and a hard input number in it. Example (=A1 + 5)

I am trying to figure out a way to create a function that either

always
updates based on they type of input in a cell or that I can just

use a
shortcut key that goes throught the sheet to update all the cells.

I
currently define a name called FormulaInCell
=GET.CELL(48,INDIRECT("rc",FALSE))and then just select all cells

and
use conditional formatting to make that black and it colors all
formulas black. However I would like it to be more robust so that

it
covers the situations mentioned above. There must be a way to do

it,
but I just can't seem to figure one out. Any help is greatly
appreciated.

Will

As an example:
2001 2002 2003 2004E 2005E
Sales 100.0 110.0 120.0 129.0 137.4
Sales Growth 7.0% 10.0% 9.1% 7.5% 6.5%
Profit 52.0 53.0 58.0 60.6 63.9
Profit Margin 52.0% 48.2% 48.3% 47.0% 46.5%

In this model:
2001-2003 Sales are Blue because they are hard coded inputs
2001-2003 Growth is Black because it is a formula
2001-2003 Profit is Purple because it is linked from another sheet
2001-2003 Profit Margin is Black because it is a formula

2004E-2005E sales are black and calculated as
previous years sales * (1+ sales growth)
2004E-2005E Growth is hardcoded, but green because it drives the

sales
number
2004E-2005E Profit is Black and calculated as Sales * Profit Margin
2004E-2005E Profit Margin is Red Because it is calculated as the
previous years profit margin + .1%


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Return cell address of a cell based on contents of cell. Danny Excel Worksheet Functions 4 November 15th 08 03:11 AM
Coloring a cell based off the color of another cell Eric D Excel Discussion (Misc queries) 4 June 13th 08 05:24 PM
Returning Cell Contents of One Cell Based On Another Cell DallasLDY Excel Worksheet Functions 5 January 31st 07 11:00 PM
Conditional coloring of Excel cells, based on adjacent cell values? Greg Stuart Excel Worksheet Functions 0 March 10th 06 10:14 PM
Please help! Macro to change cell contents based on cell to the left Jennifer[_8_] Excel Programming 7 March 4th 04 01:06 AM


All times are GMT +1. The time now is 03:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"