VBA (I Think!)
VBA Telemetry pings you when your VBA projects fail
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: VBA (I Think!)

  1. #1
    New Member
    Join Date
    Mar 2002
    Location
    Nottingham, England
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Greetings folks. My first time here.....

    Now, I'm sure this question has been asked many times, but here we go again....

    I've been putting together some Excel sheets at work for gathering and processing various statistics (HEAVY use of the IF / COUNTIF functions!).

    I was wondering if there is a way to pick which colour is used depending on certain results.... eg

    A3 - =IF(A1>A2"YES",))

    Obviously, if A1=2 and A2=1, then A3=YES (sounds like BBC Basic to me!).

    What I would like to do is also use the result to determine the text colour, so that a 'TRUE' result would appear red, and a 'FALSE' result would appear black, and so on....

    Oh - if it makes any difference, I will be using Excel 97.

    Any help would be appreciated.

    Thanks

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sydney, Australia
    Posts
    2,936
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default

    No VBA needed. Click the cell you want to apply the formatting to and choose Conditional Formatting. Then you'd use something like:-

    Condition 1
    Cell Value Is Equal to TRUE (choose a format of red)

    Condition 2
    Cell Value Is Equal to FALSE (choose a format of black)

    HTH,
    Dan

  3. #3
    New Member
    Join Date
    Mar 2002
    Location
    Nottingham, England
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Nice and simple (Just the way I like it!)

    Thanks a lot - I really appreciate your help.

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com