Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JHG JHG is offline
external usenet poster
 
Posts: 3
Default Can Excel's field fill colors be changed using "IF" statements?

I'm trying to use "IF" staements in Excel to pull values into fields as well
as to change the field fill color based on certain parameters. Pulling the
values in is the easy part, but can the field fill colors be controlled as
well?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 236
Default Can Excel's field fill colors be changed using "IF" statements?

What do you mean by 'fields'?
If you're talking about cells.
myrange.Interior.ColorIndex = 6 'yellow
myrange.Interior.ColorIndex = 3 'red
myrange.Interior.ColorIndex = 5 'blue
If you're talking about listboxes, textboxes, comboboxes...
Me.ListBox1.BackColor = "&H0000FFFF&" 'yellow
Me.ListBox1.BackColor = "&H000000FF&" 'red
Me.ListBox1.BackColor = "&H00FF0000&" 'blue

--
Hope this helps.
If it does, please click the Yes button.
Thanks in advance for your feedback.
Gary Brown



"JHG" wrote:

I'm trying to use "IF" staements in Excel to pull values into fields as well
as to change the field fill color based on certain parameters. Pulling the
values in is the easy part, but can the field fill colors be controlled as
well?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JHG JHG is offline
external usenet poster
 
Posts: 3
Default Can Excel's field fill colors be changed using "IF" statements

Hi Gary - yes, I was talking about cells. I appreciate the response but I'm
still not sure howto use what you have given me. I've tried to test by
plugging a statement into a cell but receive errors.I also tried an"=" but it
didn't like that either.

Thanks,

Jeff

"Gary Brown" wrote:

What do you mean by 'fields'?
If you're talking about cells.
myrange.Interior.ColorIndex = 6 'yellow
myrange.Interior.ColorIndex = 3 'red
myrange.Interior.ColorIndex = 5 'blue
If you're talking about listboxes, textboxes, comboboxes...
Me.ListBox1.BackColor = "&H0000FFFF&" 'yellow
Me.ListBox1.BackColor = "&H000000FF&" 'red
Me.ListBox1.BackColor = "&H00FF0000&" 'blue

--
Hope this helps.
If it does, please click the Yes button.
Thanks in advance for your feedback.
Gary Brown



"JHG" wrote:

I'm trying to use "IF" staements in Excel to pull values into fields as well
as to change the field fill color based on certain parameters. Pulling the
values in is the easy part, but can the field fill colors be controlled as
well?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 236
Default Can Excel's field fill colors be changed using "IF" statements

Those were answers if you're using macros.
Use Conditional Formating to change the colors depending on the cell contents.
--
Hope this helps.
If it does, please click the Yes button.
Thanks in advance for your feedback.
Gary Brown



"JHG" wrote:

Hi Gary - yes, I was talking about cells. I appreciate the response but I'm
still not sure howto use what you have given me. I've tried to test by
plugging a statement into a cell but receive errors.I also tried an"=" but it
didn't like that either.

Thanks,

Jeff

"Gary Brown" wrote:

What do you mean by 'fields'?
If you're talking about cells.
myrange.Interior.ColorIndex = 6 'yellow
myrange.Interior.ColorIndex = 3 'red
myrange.Interior.ColorIndex = 5 'blue
If you're talking about listboxes, textboxes, comboboxes...
Me.ListBox1.BackColor = "&H0000FFFF&" 'yellow
Me.ListBox1.BackColor = "&H000000FF&" 'red
Me.ListBox1.BackColor = "&H00FF0000&" 'blue

--
Hope this helps.
If it does, please click the Yes button.
Thanks in advance for your feedback.
Gary Brown



"JHG" wrote:

I'm trying to use "IF" staements in Excel to pull values into fields as well
as to change the field fill color based on certain parameters. Pulling the
values in is the easy part, but can the field fill colors be controlled as
well?

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
Can the Excel cell fill color be changed using "IF" statements? JHG Excel Worksheet Functions 1 May 8th 09 10:13 AM
Used drawing colors in shapes....lost default colors for "Fill Col Lai704 Excel Discussion (Misc queries) 1 August 20th 08 04:45 AM
Run macro only if Field E10 = "WO ID" and AB10 = "Spec Sizing" ldiaz Excel Discussion (Misc queries) 2 March 16th 08 09:23 PM
Run macro only if Field E10 = "WO ID" and AB10 = "Spec Sizing" ldiaz Excel Discussion (Misc queries) 2 March 15th 08 07:26 PM
"More Fill Colors" does not appear Coco Excel Discussion (Misc queries) 4 March 18th 07 01:03 AM


All times are GMT +1. The time now is 10:47 AM.

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"