Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default set "value if true" to "fill cell with color"

I want to use an IF statement to check for text in a cell range and if true,
then fill a cell with a highlight color. In my application, I would look for
"PD" in invoice date fields and if found, highlight the amount invoiced in
green. I don't know the snytax to write the return value as "fill this cell
with color".
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default set "value if true" to "fill cell with color"

You can't do what you want in the way that you describe, that is, with a
formula. Have a look at conditional formatting. That will do what you
want.

Assume that your invoice dates are in column C, starting in row 2. In Cell
D2, or whatever:

Format | Conditional Formatting... | Condition 1: Formula is | =C2="pd"

Change the format as required, for example, Format | Patterns = green

Copy the formatting to the other cells you want to highlight.

Regards

Trevor


"Feeta" wrote in message
...
I want to use an IF statement to check for text in a cell range and if
true,
then fill a cell with a highlight color. In my application, I would look
for
"PD" in invoice date fields and if found, highlight the amount invoiced in
green. I don't know the snytax to write the return value as "fill this
cell
with color".



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default set "value if true" to "fill cell with color"

Check out Conditional Formatting...

No code required. Just use a formula condition.

--
steveB

Remove "AYN" from email to respond
"Feeta" wrote in message
...
I want to use an IF statement to check for text in a cell range and if
true,
then fill a cell with a highlight color. In my application, I would look
for
"PD" in invoice date fields and if found, highlight the amount invoiced in
green. I don't know the snytax to write the return value as "fill this
cell
with color".



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default set "value if true" to "fill cell with color"

Thank you, this is exactly what I needed to know. I appreciate the detail you
provided.

"Trevor Shuttleworth" wrote:

You can't do what you want in the way that you describe, that is, with a
formula. Have a look at conditional formatting. That will do what you
want.

Assume that your invoice dates are in column C, starting in row 2. In Cell
D2, or whatever:

Format | Conditional Formatting... | Condition 1: Formula is | =C2="pd"

Change the format as required, for example, Format | Patterns = green

Copy the formatting to the other cells you want to highlight.

Regards

Trevor


"Feeta" wrote in message
...
I want to use an IF statement to check for text in a cell range and if
true,
then fill a cell with a highlight color. In my application, I would look
for
"PD" in invoice date fields and if found, highlight the amount invoiced in
green. I don't know the snytax to write the return value as "fill this
cell
with color".




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default set "value if true" to "fill cell with color"

You're welcome, thanks for the feedback.


"Feeta" wrote in message
...
Thank you, this is exactly what I needed to know. I appreciate the detail
you
provided.

"Trevor Shuttleworth" wrote:

You can't do what you want in the way that you describe, that is, with a
formula. Have a look at conditional formatting. That will do what you
want.

Assume that your invoice dates are in column C, starting in row 2. In
Cell
D2, or whatever:

Format | Conditional Formatting... | Condition 1: Formula is | =C2="pd"

Change the format as required, for example, Format | Patterns = green

Copy the formatting to the other cells you want to highlight.

Regards

Trevor


"Feeta" wrote in message
...
I want to use an IF statement to check for text in a cell range and if
true,
then fill a cell with a highlight color. In my application, I would
look
for
"PD" in invoice date fields and if found, highlight the amount invoiced
in
green. I don't know the snytax to write the return value as "fill this
cell
with color".






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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Check if cells contain the word "Thailand", return "TRUE" ali Excel Worksheet Functions 7 September 14th 07 09:53 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Typing "true" excel 2007 change it to "TRUE" Mr. T Excel Discussion (Misc queries) 2 April 11th 07 01:24 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


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