VBA (I Think!)

Anonymizeruk

New Member
Joined
Mar 11, 2002
Messages
2
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
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
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
 
Upvote 0

Forum statistics

Threads
1,214,897
Messages
6,122,151
Members
449,068
Latest member
shiz11713

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top