Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Could someone please help me write a macro that changes the colorIndex of a
cell based on it's value. I want all positive numbers in my selection to be green and all negative numbers to be red... this should be easy but I need help! Thanks, Matt |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Matt,
Try using conditional formatting: Data | Conditional formatting... Condition1 Formula is: =A1=0 Format | select a green pattern Condition 2 Condition1 Formula is: =A1<0 Format | select a red pattern --- Regards, Norman "Matt_70501" wrote in message ... Could someone please help me write a macro that changes the colorIndex of a cell based on it's value. I want all positive numbers in my selection to be green and all negative numbers to be red... this should be easy but I need help! Thanks, Matt |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Or use a custom cell format
0.00;[Red]-0.00 -- Regards Ron de Bruin http://www.rondebruin.nl "Norman Jones" wrote in message ... Hi Matt, Try using conditional formatting: Data | Conditional formatting... Condition1 Formula is: =A1=0 Format | select a green pattern Condition 2 Condition1 Formula is: =A1<0 Format | select a red pattern --- Regards, Norman "Matt_70501" wrote in message ... Could someone please help me write a macro that changes the colorIndex of a cell based on it's value. I want all positive numbers in my selection to be green and all negative numbers to be red... this should be easy but I need help! Thanks, Matt |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry, I miss the color
green -- Regards Ron de Bruin http://www.rondebruin.nl "Ron de Bruin" wrote in message ... Or use a custom cell format 0.00;[Red]-0.00 -- Regards Ron de Bruin http://www.rondebruin.nl "Norman Jones" wrote in message ... Hi Matt, Try using conditional formatting: Data | Conditional formatting... Condition1 Formula is: =A1=0 Format | select a green pattern Condition 2 Condition1 Formula is: =A1<0 Format | select a red pattern --- Regards, Norman "Matt_70501" wrote in message ... Could someone please help me write a macro that changes the colorIndex of a cell based on it's value. I want all positive numbers in my selection to be green and all negative numbers to be red... this should be easy but I need help! Thanks, Matt |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, Best doing this with conditional formatting, choose your cell select Formats, Conditional Formatting then click the drop down box next to Cell Is and select Formula is, assuming you are using Cell A1 type in the box =A10 then choose formats, patterns and then select your colour, now click add do the same as above only this time type =A1<0 and choose formats, patterns and your colour, then copy the cell over as many as you like. Hope this helps! regards, Simon -- Simon Lloyd ------------------------------------------------------------------------ Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708 View this thread: http://www.excelforum.com/showthread...hreadid=546296 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i write a macro to change font color with live data? | Excel Programming | |||
Trying to change ColorIndex for series settings | Charts and Charting in Excel | |||
ColorIndex and Caps Change too slow | Excel Programming | |||
is it possible to execute write to the fields in another .xsl form a macro in another .xsl? e.g. some way to load another .xsl into an .xsl macro and write to its data? | Excel Worksheet Functions | |||
change font of certain cells in row(s) when ColorIndex of Column S changes | Excel Programming |