Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() hi, 1) i need to use macro because there is quite alot of cells that need to be filled with different colors because there are quite a number of values. and it seems to me that by using conditional format, i can only format up to three different criterias. 2) the cells will merge when they contain a specific value that has been predefined earlier on. the new value will be replace the existing value on the merged cell. is there any ways that could make these two macros possible? thanks :) -- porkie ------------------------------------------------------------------------ porkie's Profile: http://www.excelforum.com/member.php...o&userid=14556 View this thread: http://www.excelforum.com/showthread...hreadid=261902 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub AlterCells()
for each cell in UsedRange Select Case lcase(Cell.Value) Case "high" if cell.MergeArea.Count = 1 then if lcase(cell.offset(1,0).Value) = "low" then cell.Value = "Neutral" cell.offset(1,0).ClearContents cell.resize(2,1).Merge end if end if Case "susan" cell.interior.ColorIndex = 5 Case Else cell.Interior.ColorIndex = xlNone End Select End Sub -- Regards, Tom Ogilvy "porkie" wrote in message ... hi, 1) i need to use macro because there is quite alot of cells that need to be filled with different colors because there are quite a number of values. and it seems to me that by using conditional format, i can only format up to three different criterias. 2) the cells will merge when they contain a specific value that has been predefined earlier on. the new value will be replace the existing value on the merged cell. is there any ways that could make these two macros possible? thanks :) -- porkie ------------------------------------------------------------------------ porkie's Profile: http://www.excelforum.com/member.php...o&userid=14556 View this thread: http://www.excelforum.com/showthread...hreadid=261902 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I merge cells into one then delete the original cells? | Excel Worksheet Functions | |||
Fill cells with color based on criteria in two cells | Excel Worksheet Functions | |||
How do I fill (copy) nonadjacent cells to adjacent cells? | Excel Discussion (Misc queries) | |||
HOW TO FORMATE CELLS TO COUNT CELLS WITH A FILL COLOR? | New Users to Excel | |||
fill cells, merge cells | Excel Programming |