+ Reply to Thread
Results 1 to 4 of 4

Thread: setting background

  1. #1
    Elena
    Guest

    setting background

    I want to set the background of a cell in Excel depending on a condition.
    I've tried two methods:

    If intVal = 3 Then
    CDRLWs.Range("a1").Font.Background = 3
    End If

    If intVal = 3 Then
    CDRLWs.Range("a1").Font.Background = "Red"
    End If

    Neither are working.

    Any suggestions?

    Thanks in Advance!
    ~Elena

  2. #2
    Ardus Petus
    Guest

    Re: setting background

    CDRLWs.Range("A1").Interior.Colorindex = 3

    HTH
    --
    AP

    "Elena" <Elena@discussions.microsoft.com> a écrit dans le message de news:
    0FAABA24-4E02-448B-8E43-E7BB6AC1C0D9@microsoft.com...
    >I want to set the background of a cell in Excel depending on a condition.
    > I've tried two methods:
    >
    > If intVal = 3 Then
    > CDRLWs.Range("a1").Font.Background = 3
    > End If
    >
    > If intVal = 3 Then
    > CDRLWs.Range("a1").Font.Background = "Red"
    > End If
    >
    > Neither are working.
    >
    > Any suggestions?
    >
    > Thanks in Advance!
    > ~Elena




  3. #3
    Elena
    Guest

    Re: setting background

    The background color isn't changing. Any other ideas?

    Thanks!


    "Ardus Petus" wrote:

    > CDRLWs.Range("A1").Interior.Colorindex = 3
    >
    > HTH
    > --
    > AP
    >
    > "Elena" <Elena@discussions.microsoft.com> a écrit dans le message de news:
    > 0FAABA24-4E02-448B-8E43-E7BB6AC1C0D9@microsoft.com...
    > >I want to set the background of a cell in Excel depending on a condition.
    > > I've tried two methods:
    > >
    > > If intVal = 3 Then
    > > CDRLWs.Range("a1").Font.Background = 3
    > > End If
    > >
    > > If intVal = 3 Then
    > > CDRLWs.Range("a1").Font.Background = "Red"
    > > End If
    > >
    > > Neither are working.
    > >
    > > Any suggestions?
    > >
    > > Thanks in Advance!
    > > ~Elena

    >
    >
    >


  4. #4
    Elena
    Guest

    Re: setting background

    Disregard previous message. It works perfectly. THANK YOU!

    "Ardus Petus" wrote:

    > CDRLWs.Range("A1").Interior.Colorindex = 3
    >
    > HTH
    > --
    > AP
    >
    > "Elena" <Elena@discussions.microsoft.com> a écrit dans le message de news:
    > 0FAABA24-4E02-448B-8E43-E7BB6AC1C0D9@microsoft.com...
    > >I want to set the background of a cell in Excel depending on a condition.
    > > I've tried two methods:
    > >
    > > If intVal = 3 Then
    > > CDRLWs.Range("a1").Font.Background = 3
    > > End If
    > >
    > > If intVal = 3 Then
    > > CDRLWs.Range("a1").Font.Background = "Red"
    > > End If
    > >
    > > Neither are working.
    > >
    > > Any suggestions?
    > >
    > > Thanks in Advance!
    > > ~Elena

    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0