Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks for your help. I will try your VBA Code as it seems to be exactly
what I need Danielle "DCSwearingen" wrote: Try this: '------------------ Option Explicit '------------------ Private Function FindLastCell() Dim lCell As String Range("A1").Select lCell = ActiveCell.SpecialCells(xlLastCell).Address FindLastCell = lCell End Function '------------------ Private Sub CondFormat() Dim cFormat As String, cCell As String, tRange As String, c As Range Dim lCell As String, lRow As Long, lCol As Long lCell = FindLastCell lRow = Range(lCell).Row lCol = Range(lCell).Column tRange = "$A$1:" & lCell For Each c In Range(tRange) cFormat = "=$G$" & c.Row & "=""W""" c.FormatConditions.Add Type:=xlExpression, Formula1:=cFormat c.FormatConditions(1).Font.ColorIndex = 2 c.FormatConditions(1).Interior.ColorIndex = 13 Next tRange = Cells(lRow, 1).Address tRange = "$A$1:" & tRange For Each c In Range(tRange) cFormat = "=$G$" & c.Row & "=""B""" c.FormatConditions.Add Type:=xlExpression, Formula1:=cFormat c.FormatConditions(2).Font.Bold = True Next End Sub -- DCSwearingen Getting old, but love computers. ------------------------------------------------------------------------ DCSwearingen's Profile: http://www.excelforum.com/member.php...o&userid=21506 View this thread: http://www.excelforum.com/showthread...hreadid=552671 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Editing a simple macro | Excel Worksheet Functions | |||
Closing File Error | Excel Discussion (Misc queries) | |||
macro with F9 | Excel Discussion (Misc queries) | |||
Make Alignment options under format cells available as shortcut | Excel Discussion (Misc queries) | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) |