Excel: Is it possible to set the text colour of a result of a formula within the formula code?
You could achieve this with the use of a helper cell or VBA code. Conditional formatting can colour based on the result of a cell matching a value, being in a rage etc or even if you want to format it according to a formula. Conditional formatting also does not have to be based on the cell it is applied to but could be based on the value from other cells.
So as Scott said, not in the formula itself, but there are other ways to automatically colour code based n values.
Related
How can I do this logical idea in excel:
Cell A contains date
Cell B has a value
If cell's A date is lesser than today and cell B is blank (does not have any value), then:
color cell B with red color.
I have the idea but I didn't know how to make it, neither from conditional formatting nor from excel formulas.
Does it need any VBA? or JS? because the file is on google sheets which does not support VBA as you know.
Select column A and define the conditionnal formatiing as follows
=and(B1="",A1<today(),A1<>"")
I am trying to change the fill and font color of only A2 and B2 if E2 contains the string "departments" for example.
I have found formulas that highlight the whole row, but I only want select cells of the row while actually formatting with colors, and I can't quite get it right with conditional formatting.
Any help would be appreciated.
Use a rule based on the following formula:
=SEARCH("departments",$E1)>0
and apply it to columns A and B.
You can also simplify the formula to just =SEARCH("departments",$E1)
I'm trying to automatize the result of a cell based on the color or data from a range.
Explanation: It will be a "OK" or "NOT OK" in a cell when there are red cells in a range or when there are some words there. Down is the image about an example of the table I want to work with.
Example
I want to know if it is possible to do it only with formula or have to do it through VBA.
If you need to use the color you will have to use vba, you can check the color of a cell with Cell.Interior.Color
On a side note, if you do not want to use vba you could use the condition you use for your conditional formatting (Assigning the color to the cell) in the cell formula instead of using the color.
Is it possible to use conditional formatting to color a cell if the colors of two other cells match each other?
There is no formula that can read what color a cell is. Color is not data. don't use cell fill as metadata. Instead, use conditional formatting with logic that can be applied further down the calculation chain.
So, instead of coloring cells yellow manually and then trying to figure out a way to sum all cells where the next one over is yellow, use conditional formatting to set the cell yellow based on a status or value in another, corresponding cell. Then you can use that status or value in the corresponding cell to determine if the cell should be included in a further calculation like a conditional sum.
I want to apply a conditional formatting (CF) rule to a group of cells to individually colour them if their individual cell values are greater than a threshold (in this case >=5). To illustrate:
The top row shows how I want the bottom row to look. For the bottom row I cannot figure out how correctly format according to cell-specific formulae.
The problem is identifying a way to specify cell-specific CF formulas in a single operation for a group of cells - as you can by pasting/dragging normal cell formulas. I obviously don't want to have to manually specify the formula for each cell!
Grateful for assistance.
Select the rows or columns or range that you want to conditional format,
Enter the below formula in the formula bar in conditional format and choose a fill color,
=AND(A1>=5,ISNUMBER(A1))
If you are starting in row3, change the A1 to A3. The $ that you have in the formula makes it absolute. It should be relative.
You just select all required cells to format. Then go to conditional formatting.
Check what is the cell shown just before the formula bar (the single cell that represents the selected range, also called default cell) and use that cell in your formula without absolute reference. like B3>=5 or R3>=5