![]() |
fill cells, merge cells
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 |
fill cells, merge cells
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 |
All times are GMT +1. The time now is 07:36 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com