Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 336
Default Colour using If statement

Hello,

I have the following calculation in a cell:

=IF(C28+C41 = 0, TREND(C9:C15,A9:A15,A16,1),C28+C41)

This is to use the trend function if the cell value is 0, this works fine.
What I would like to do however is to colour the font in red if the trend
function is being used but leave as black if there is actual data there i.e.
C28+C41 is not equal to 0.

I would really appreciate knowing how to do this.

Many thanks,

Martin
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Colour using If statement

Hi,

Use conditional formattting.

Select the cell with the formula in then:-

Format conditional formatting
Select 'Formula is'
enter the formula
=C28+C41=0

Pick a font colour

OK

Mike

"Martin" wrote:

Hello,

I have the following calculation in a cell:

=IF(C28+C41 = 0, TREND(C9:C15,A9:A15,A16,1),C28+C41)

This is to use the trend function if the cell value is 0, this works fine.
What I would like to do however is to colour the font in red if the trend
function is being used but leave as black if there is actual data there i.e.
C28+C41 is not equal to 0.

I would really appreciate knowing how to do this.

Many thanks,

Martin

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 336
Default Colour using If statement

Hi,

I have tried this and since made a change to the calculation which is now:

=IF(qryData!CH37 = 0, TREND(N22:N27,$A$22:$A$27,$A$28,1), qryData!CH37)

I tried this in the conditional formatting Formula Is section but no success.

Any further ideas?

I appreciate your help.

Martin

"Mike H" wrote:

Hi,

Use conditional formattting.

Select the cell with the formula in then:-

Format conditional formatting
Select 'Formula is'
enter the formula
=C28+C41=0

Pick a font colour

OK

Mike

"Martin" wrote:

Hello,

I have the following calculation in a cell:

=IF(C28+C41 = 0, TREND(C9:C15,A9:A15,A16,1),C28+C41)

This is to use the trend function if the cell value is 0, this works fine.
What I would like to do however is to colour the font in red if the trend
function is being used but leave as black if there is actual data there i.e.
C28+C41 is not equal to 0.

I would really appreciate knowing how to do this.

Many thanks,

Martin

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Colour using If statement

Martin,

You can't directly use another sheet in conditional formatting so do it
indirectly. Somewhere on the formula sheet have a cell this in it
=qryData!CH37

The use that cell in your conditional format.
=Cell_address_on_This_sheet=0


Mike
"Martin" wrote:

Hi,

I have tried this and since made a change to the calculation which is now:

=IF(qryData!CH37 = 0, TREND(N22:N27,$A$22:$A$27,$A$28,1), qryData!CH37)

I tried this in the conditional formatting Formula Is section but no success.

Any further ideas?

I appreciate your help.

Martin

"Mike H" wrote:

Hi,

Use conditional formattting.

Select the cell with the formula in then:-

Format conditional formatting
Select 'Formula is'
enter the formula
=C28+C41=0

Pick a font colour

OK

Mike

"Martin" wrote:

Hello,

I have the following calculation in a cell:

=IF(C28+C41 = 0, TREND(C9:C15,A9:A15,A16,1),C28+C41)

This is to use the trend function if the cell value is 0, this works fine.
What I would like to do however is to colour the font in red if the trend
function is being used but leave as black if there is actual data there i.e.
C28+C41 is not equal to 0.

I would really appreciate knowing how to do this.

Many thanks,

Martin

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7,247
Default Colour using If statement


Or, use a defined name to reference the cell on the other sheet.
Conditional Formatting accepts names that point to other sheets.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)

On Wed, 22 Oct 2008 06:21:02 -0700, Mike H
wrote:

Martin,

You can't directly use another sheet in conditional formatting so do it
indirectly. Somewhere on the formula sheet have a cell this in it
=qryData!CH37

The use that cell in your conditional format.
=Cell_address_on_This_sheet=0


Mike
"Martin" wrote:

Hi,

I have tried this and since made a change to the calculation which is now:

=IF(qryData!CH37 = 0, TREND(N22:N27,$A$22:$A$27,$A$28,1), qryData!CH37)

I tried this in the conditional formatting Formula Is section but no success.

Any further ideas?

I appreciate your help.

Martin

"Mike H" wrote:

Hi,

Use conditional formattting.

Select the cell with the formula in then:-

Format conditional formatting
Select 'Formula is'
enter the formula
=C28+C41=0

Pick a font colour

OK

Mike

"Martin" wrote:

Hello,

I have the following calculation in a cell:

=IF(C28+C41 = 0, TREND(C9:C15,A9:A15,A16,1),C28+C41)

This is to use the trend function if the cell value is 0, this works fine.
What I would like to do however is to colour the font in red if the trend
function is being used but leave as black if there is actual data there i.e.
C28+C41 is not equal to 0.

I would really appreciate knowing how to do this.

Many thanks,

Martin

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
How can colour of cell shading be fixed to one colour Tabrez Excel Discussion (Misc queries) 2 September 23rd 08 04:55 PM
how to create a if statement, if true turn colour Yashes Excel Worksheet Functions 3 October 24th 06 11:12 PM
How do I save new colour schemes for graphs in the colour template Alison Charts and Charting in Excel 1 July 22nd 06 10:35 PM
change a cell background colour to my own RGB colour requirements Stephen Doughty Excel Discussion (Misc queries) 4 June 16th 06 01:08 PM
Text in Blue colour, but print in black colour wuwu Excel Worksheet Functions 1 November 13th 04 02:36 PM


All times are GMT +1. The time now is 10:14 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"