Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Mar 2001
    Location
    Bismarck, ND, USA
    Posts
    451
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Conditional Format Based on Two Cells (2002 SP2)

    I have read a lot of information on conditional formatting today using Search but have been unable to find a solution for my dilemma.

    I am exporting tasks from Outlook to Excel. I want Excel to format the cells under the Subject column (A) with strikeout if the corresponding cell in the Status column © is "complete".

    I thought I would export the tasks to the same file each time, overwriting the previous exported Excel file. Ideally, it would be great if the conditional formatting could be done through a macro that could be run each time the tasks are exported to a new Excel file (weekly).

    Any suggestions on a better way to do this?
    egghead

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conditional Format Based on Two Cells (2002 SP2)

    The formatting can be done using the Excel Conditional Formatting feature.

    1- Select all of column A, or at least the maximum number of cells in column A that will ever contain data. Make sure that when you do the selection that cell A1 is the active cell in the selection.

    2- On the Format menu click on "Conditional Formatting..."

    3- Drop down the left drop down list and select "Formula is".

    4- In the formula box enter:

    <pre>=C1="complete"
    </pre>


    5- Click on the Format button and then on the Font tab click on Strikethrough to select it.

    6- Click on OK until all dialog boxes are closed.

    I don't know enough about exporting from Outlook to tell you how to accomplish that part of it.
    Legare Coleman

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Conditional Format Based on Two Cells (2002 SP2)

    If you are running a macro, here's a start on the conditional formatting part:

    With Range("A2")
    .Activate
    .FormatConditions.Delete
    .FormatConditions.Add Type:=xlExpression, Formula1:= _
    "=C2=""Complete"""
    .FormatConditions(1).Font.Strikethrough = True
    .Copy
    End With
    Range("A2:A65536").PasteSpecial Paste:=xlFormats
    Application.CutCopyMode = False

    Seems like this could simpler but the formula goes wonky if I don't activate A2, and I'm too burned out to figure it out. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    -John ... I float in liquid gardens
    UTC -7±DS

  4. #4
    Star Lounger
    Join Date
    Apr 2002
    Location
    Vlissingen, Netherlands
    Posts
    63
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Conditional Format Based on Two Cells (2002 SP2)

    Hi,
    Have a look at http://j-walk.com/ss/excel/eee/ and look for Issue No. 8 (July 1, 1999):
    Special edition on conditional formatting. This self-extracting EXE file file (117K) contains a Word document and an Excel workbook that provides lots of useful information about conditional formatting for Excel 97 and later.

    sgrjbw

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •