Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I want each cell right to a cell containing "I" in the column B to be filled with a pattern. What's missing? (The call of the pattern is also wrong...) Dim cell As Range For Each cell In Range("B:B") If cell = "I" Then *(XXX)*.Offset(0, 1).*Fill.Patterned msoPattern50Percent* Next -- Turquoise_dax ------------------------------------------------------------------------ Turquoise_dax's Profile: http://www.excelforum.com/member.php...o&userid=35185 View this thread: http://www.excelforum.com/showthread...hreadid=554613 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try (change pattern to suit):
Dim cell As Range For Each cell In Range("B:B") If cell = "I" Then cell.Offset(0, 1).Interior.Pattern = xlGray50 End If Next "Turquoise_dax" wrote: I want each cell right to a cell containing "I" in the column B to be filled with a pattern. What's missing? (The call of the pattern is also wrong...) Dim cell As Range For Each cell In Range("B:B") If cell = "I" Then *(XXX)*.Offset(0, 1).*Fill.Patterned msoPattern50Percent* Next -- Turquoise_dax ------------------------------------------------------------------------ Turquoise_dax's Profile: http://www.excelforum.com/member.php...o&userid=35185 View this thread: http://www.excelforum.com/showthread...hreadid=554613 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Thu, 22 Jun 2006 10:34:16 -0500, Turquoise_dax wrote:
I want each cell right to a cell containing "I" in the column B to be filled with a pattern. What's missing? (The call of the pattern is also wrong...) Dim cell As Range For Each cell In Range("B:B") If cell = "I" Then *(XXX)*.Offset(0, 1).*Fill.Patterned msoPattern50Percent* Next Consider conditional formatting. If CF is not suitable for you (because, let's say, you have REALLY huge amounts of data and REALLY slow computer), use: If cell.Value = "I" Then cell.Offset(0, 1).Interior.Pattern=xlGray50 -- PL |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This might work for you:
Columns("B").Select Selection.AutoFilter Field:=1, Criteria1:="=I", Operator:=xlAnd Columns("C").Select Selection.Interior.Pattern = xlGray50 Jim "Turquoise_dax" wrote: I want each cell right to a cell containing "I" in the column B to be filled with a pattern. What's missing? (The call of the pattern is also wrong...) Dim cell As Range For Each cell In Range("B:B") If cell = "I" Then *(XXX)*.Offset(0, 1).*Fill.Patterned msoPattern50Percent* Next -- Turquoise_dax ------------------------------------------------------------------------ Turquoise_dax's Profile: http://www.excelforum.com/member.php...o&userid=35185 View this thread: http://www.excelforum.com/showthread...hreadid=554613 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro - Code Missing | Excel Discussion (Misc queries) | |||
VB code gone missing | Excel Programming | |||
code to fill in missing border lines | Excel Discussion (Misc queries) | |||
Missing dll to work with Ron de Bruin's code | Excel Programming | |||
Solver code does not save results to sheet - What am I missing?! | Excel Programming |