Hi guys,
Is it possible in Calc to create a formula etc to change the background colour of a Box?
So, if 'Blue' was written in A1, A1's background colour would change to Blue.
Thanks
Neil
Title Edited. A descriptive title for posts helps others who are searching for solutions and increases the chances of a reply (Hagar, Moderator).
Formula to change cell background color
Formula to change cell background color
Last edited by neil-uk on Sun Nov 14, 2010 12:42 am, edited 1 time in total.
NeoOffice 2.2.3 with MacOS 10.4
Re: A would it work question
Yes, provided you don't need to set more than 3 conditions you can do it through conditional formating,
Format > Conditional formatting.
Format > Conditional formatting.
OOo 3.3 on Windows 7 & 3.2.1 on Mint 10
Re: A would it work question
Hi, Thanks for this.
I was hoping for a few more colours - such as Red, Blue, Green, Yellow, Orange, Purple, White, Brown and Grey.
Are there any other options?
Thanks
Neil
I was hoping for a few more colours - such as Red, Blue, Green, Yellow, Orange, Purple, White, Brown and Grey.
Are there any other options?
Thanks
Neil
NeoOffice 2.2.3 with MacOS 10.4
Re: Formula to change cell background color
Hi,
If you have more than 3 colors, you can use the STYLE() function.
First, define style you need (Blue, Red, Green.....) with stylist (F11)
Second, use STYLE() in conditional formatting.
Example : Gérard
If you have more than 3 colors, you can use the STYLE() function.
First, define style you need (Blue, Red, Green.....) with stylist (F11)
Second, use STYLE() in conditional formatting.
Example : Gérard
LibreOffice 6.4.5 on Windows 10
Re: Formula to change cell background color
Hi Gerard,
Thanks for sending this example over.
But, as I changed the drop down boxes for different colours, the backgrounds didn't seem to change.
I can't seem to work out the coding, and the Help menu isn't much help.
Can you explain it in some more detail please?
Thanks
N
Thanks for sending this example over.
But, as I changed the drop down boxes for different colours, the backgrounds didn't seem to change.
I can't seem to work out the coding, and the Help menu isn't much help.
Can you explain it in some more detail please?
Thanks
N
NeoOffice 2.2.3 with MacOS 10.4
Re: Formula to change cell background color
You must to name those cellstyles as color names, When you select (or type in) a color name into a cell, the applied "Conditional format" option will "compute" the style name from the cell content, and will apply it on cell.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Formula to change cell background color
Hi Guys,
Thaks for this.
The only issue I have now is that I want to apply these to multiple cells around the Spreadsheet.
If I select them all is going to muck up whats in my other formulas.
Will doing STYLE() automatically make each cell I have edited see itself, or will I need to go through each one and so STYLE(A1), STYLE(B5) etc?
Thaks for this.
The only issue I have now is that I want to apply these to multiple cells around the Spreadsheet.
If I select them all is going to muck up whats in my other formulas.
Will doing STYLE() automatically make each cell I have edited see itself, or will I need to go through each one and so STYLE(A1), STYLE(B5) etc?
NeoOffice 2.2.3 with MacOS 10.4
Re: Formula to change cell background color
You can select all the cells you want to apply conditional formatting and write the formula STYLE(Cell wich have focus).
Or format one cell and copy to others with the paintbrush.
Or copy/paste special > Formats
A+
Or format one cell and copy to others with the paintbrush.
Or copy/paste special > Formats
A+
LibreOffice 6.4.5 on Windows 10