Is there any way to change the color and/or font of specific text within an excel cell? That is, I'd like one part of the cell's displayed value to be red and another part of the same cell's displayed value to be blue (as an example). Since the displayed values are being calculated as formulas, I'd need some sort of formatting formula that would apply only the stuff inside the formula. I can't seem to find anything in the text.
If you want to do this based on a formula, you will have to write some VBA. See this example
No problem. Edit the value in the formula toolbar.
Take a look at Conditional Formatting in excel.
Related
I'm working with numerous documents that have conditional formatting which turn a cell black if a certain value in the row is contains a specific text. The specific text varies a very often and will differ per document. When I try to write something in the black cell, it will automatically decline anything, but when I copy paste something on there it still enters the value. Because I have to copy big sets of data into these documents, I sometimes end up with values in these black cells, which can cause problems later on.
What I was wondering is if there is a way to delete any text in the cells that have the specific formatting (aka they are black) with help of the Find and Replace function or something similar.
Because I have to do it in seperate documents that I get from other people, I don't think using a formula or vba would be too practical, as I would need to manually copy it each time. But feel free to prove me wrong.
EDIT:
Hopefully this will illustrate more what my problem is.
The Background of these cells are still considered to be 'No Fill'
The conditional formatting is what causes the color
Let's assume the formatting you are trying to empty content from is yellow background cells
See image below:
Press Ctrl+H for Replace Option
Press Format Button to select the required format (yellow background)
Press Replace All
Final Result:
Hi I want to change the Fill color and text of the cell based on its value. Let's say I have the below values.
And I want to make it like this.
For me the fill colors would be just easy because I will just do the Conditional formatting. However the text is making it hard. How can I change the cell values into Text like the example above. Thanks.
Create your conditional formatting rule(s) for the colors then tap ctrl+1 and apply the following custom number format.
[>10]\G\r\e\at\e\r 1\0;[<=10]L\e\s\s 1\0
You could put that in the CFR along with the color fill change instead if you want to keep all changes in one place.
Note that you haven't changed the cells' values. =SUM(Z:Z) still equals 61.
I'm currently working in excel, and I'm trying to figure out a way to find if multiple cells contain the string value of another cell, and if it does highlight the cell where the row and column meet up. I created an example of what I want, only it will be on a much larger scale.
I've tried using: =ISNUMBER(SEARCH(substring,text)) but I'm not quite sure how to use it the way I want to.
Any help will be appreciated!
Your approach is correct, we can use the fact that conditional formatting is applied like dragging a formula, adapting relative references.
Create a conditional formatting formula rule:
=ISNUMBER(SEARCH(B$1,$A2))
Applied to B2:D7
Your formula will work nicely; what you'll want to do is put that formula into all the cells you want to highlight, so you get FALSE and TRUE in every cell.
You'll then use two Conditional Formatting rules. The first will look for Cell Value = TRUE, and will set cell background and font colour to yellow. The second will look for Cell Value = FALSE, and will set cell background to No Colour and Font to White.
This will reproduce the result you're looking for.
Edited to add:
It is possible to do this using just Conditional Formatting too, but it's a little more fiddly. If you want to try it, you can do this:
Highlight your range, and take note of which cell is Active - that's the cell within your highlighted range that is still white. It's also the one whose address is shown in the Name box in the upper left. For the sake of this answer, we'll assume that's B2
Create a new Conditional Formatting rule. Choose "Use a formula to determine which cells to format".
Use the formula =ISNUMBER(SEARCH(B$1,$A2). Set the format to colour just the cell background.
Note where the $ appears in the formula above - you want to leave the row number anchored in the first part, and the column letter anchored in the second part.
This takes advantage of the fact that Conditional Formatting is able to use absolute, relative, and mixed references to find which cells to format. It's also a tidier solution, but it can be harder to maintain if the sheet is ever repurposed or modified.
I think I have a pretty simple problem i can't figure out, I have 4 text boxs that display information like the one below, what I want to do is enter a formula in this text box so that when my data is refreshed the values change but the formatting stays the same.
I have the countif statements all working but I can't figure out how to add the formulas to the text boxes, I'm i missing out on something here?
I don't think Excel supports formulas in text boxes, you'd have to use VBA.
As a workaround, maybe you can put the formula in a cell and then format it (and the surrounding cells) to replicate the text box design?
A bit late, but, yes, you can add formulas to textboxes, just select the box and write the formula you want directly into the formula bar.
I have icon sets (Tick and close) used in excel rows. I need to calculate the count of "Ticks" in one cell and "close" in another cell. Can you please help me how to do that ?
For cells which has text i am using =CountIF(A8:A10):"Text" formula. but for icons im not sure how to do that.
If you just want to use Excel cells only you will need to add another 'helper' column, which could be then hidden, that contains the conditional formula and then use count on that.
Alternatively you could open the Visual Basic editor and insert a module, using this tutorial on conditional formatting
I think it can not be done using just functions. If you really need to see those icons for example and count them I would use something like 1 and 0 for counting, where 1 is tick and 0 close. If it bothers you, that there are 1 and 0 in cells then change font color to white, for example, then you wont see them, and to get those ticks and close icons use conditional formatting. Conditional formatting allows you to make icons, background color etc. Here is little documentation about conditional formatting. And to count use just =COUNTIF(A8:A10,"1") . That would be how I would do that, but I don't know what you are trying to achieve, hope this was useful.