Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



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
how do I merge cells into one then delete the original cells? LLR Excel Worksheet Functions 2 March 7th 08 10:59 PM
Fill cells with color based on criteria in two cells AA Excel Worksheet Functions 2 January 2nd 06 11:29 PM
How do I fill (copy) nonadjacent cells to adjacent cells? BuckyGeorge Excel Discussion (Misc queries) 2 December 22nd 05 04:18 AM
HOW TO FORMATE CELLS TO COUNT CELLS WITH A FILL COLOR? Moore New Users to Excel 1 June 15th 05 06:41 PM
fill cells, merge cells porkie Excel Programming 1 September 21st 04 07:06 AM


All times are GMT +1. The time now is 03:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"