Changing cell colour based on IF Function

jMitchell1

New Member
Joined
Jun 21, 2018
Messages
1
I have created a spreadsheet to compare the performance of last month's social media performance with this month's.

For my data, I have used the IF function. Although this is working with symbols and text, I want it to change the colour of the cell based on the data from the cells that are part of the IF function.

My current formula is:

=if(B3<C3,"?","?")

Is it possible to have the value_if_true and value_if_false change the colour of the cell, so I wouldn't have to use the symbols I have chosen?

Also, I want this to change automatically based on the data that I put into the cells B3 and C3 every month. Therefore, I don't want to have to change the colour of the cell manually.

Thanks for the help in advance.
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
you could return 1 for true, 0 for false and then use conditional formatting to set the colour based on the value. Would set an example but not sure how to show it here.
 
Upvote 0
You don't need an If function - simply subtract one cell from the other and use Conditional Formatting > Icon Sets
 
Upvote 0
I have created a spreadsheet to compare the performance of last month's social media performance with this month's.

For my data, I have used the IF function. Although this is working with symbols and text, I want it to change the colour of the cell based on the data from the cells that are part of the IF function.

My current formula is:

=if(B3<C3,"","")

Is it possible to have the value_if_true and value_if_false change the colour of the cell, so I wouldn't have to use the symbols I have chosen?

Also, I want this to change automatically based on the data that I put into the cells B3 and C3 every month. Therefore, I don't want to have to change the colour of the cell manually.

Thanks for the help in advance.

From my understanding of your problem, there is only two values that could possible be entered in the selected cell?

If so, go into conditional formatting on the home ribbon, new rule...

select based on a formula and write =if(a1="symbol x",true) then select the format that you want for this value.

repeat the process for the other value and go to manage rules and click stop if true for the second value.

You just need to update the cell reference and symbol x for what ever your data is

 
Last edited:
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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