Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() hi, When reviewing my last post I noticed a potential for error if the value is equal to z. To overcome this the Select case statement could be modified to... Code: -------------------- Select Case .Value Case .Value < z CllColour = 36 Case .Value z CllColour = 37 Case .Value = z CllColour = 40 Case Else 'eg if there is non-numeric/text string in a cell CllColour = 50 End Select ''alternatively you could merge the "=z" line with one of the others ie ' Case .Value <= z ' Case .Value = z -------------------- hth Rob -- broro183 Rob Brockett. Always learning & the best way to learn is to experience... ------------------------------------------------------------------------ broro183's Profile: http://www.thecodecage.com/forumz/member.php?userid=333 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=105261 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing all cells in one colour to a different colour | Excel Discussion (Misc queries) | |||
use "countif" function to count cells by colour | Excel Worksheet Functions | |||
i want to use the =if function to apply a colour to other cells | Excel Worksheet Functions | |||
Adding colour to a range of cells based on one of the cells v... | Excel Discussion (Misc queries) | |||
How can I change the colour of cells using an IF function? | Excel Worksheet Functions |