Colours etc. Progamming

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
aston.fearon
Posts: 3
Joined: Tue Jul 03, 2018 6:17 pm

Colours etc. Progamming

Post by aston.fearon »

Hi all. I’m wondering if anyone could help me with some formatting that I’m trying to achieve?:

1. I want to change the colour of any cell within a column to a specific colour (one of four or five set colours) based on the text of that cell. For example; if I type R1, R5 or R12 I want the cell to change red. If I type between Y1-Y12 I want the cell to turn yellow. This would mean there would be 48/60 different potential codes and 4/5 different potential colours per cell.
2. I have a red, yellow, blu and green section on separate sheets each with 12 cells that will have information in. I want the text of each cell on the colour sheet to reference whichever cell is one to the right of the cell that I typed the code on the main page. For example; If I type B1 on the main page and the cell to the right of it says “piano” I want the cell in the blue section to read “piano"

If this could be done in a way that is cross compatible on excel that would be great!!
OpenOffice 4.0 on Mac
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Colours etc. Progamming

Post by Zizi64 »

1. I want to change the colour of any cell within a column to a specific colour (one of four or five set colours) based on the text of that cell. For example; if I type R1, R5 or R12 I want the cell to change red. If I type between Y1-Y12 I want the cell to turn yellow. This would mean there would be 48/60 different potential codes and 4/5 different potential colours per cell.
The LibreOffice can handle more than three conditions in the Conditional Formatting feature. It can "format" the cell with conditionally applying different Cell Styles.
Try it.
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.
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Colours etc. Progamming

Post by Zizi64 »

If this could be done in a way that is cross compatible on excel that would be great!!
There is not 100% compatibility between the different file formats.
The incompatibility of the MS .xls/.xlsx and the ODF (.ods) file types is stronger around the formatting properties.
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.
aston.fearon
Posts: 3
Joined: Tue Jul 03, 2018 6:17 pm

Re: Colours etc. Progamming

Post by aston.fearon »

Zizi64 wrote:
The LibreOffice can handle more than three conditions in the Conditional Formatting feature. It can "format" the cell with conditionally applying different Cell Styles.
Try it.
Thanks Zizi64. Can it handle point 2 of what I wanted to do: referencing the cell based on the text in another sheet?
OpenOffice 4.0 on Mac
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Colours etc. Progamming

Post by Zizi64 »

Can it handle point 2 of what I wanted to do: referencing the cell based on the text in another sheet?
Please upload your ODF type sample file here.
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.
aston.fearon
Posts: 3
Joined: Tue Jul 03, 2018 6:17 pm

Re: Colours etc. Progamming

Post by aston.fearon »

I can't upload the ODF file as I don't know how to do it. That's why I was asking for help...
OpenOffice 4.0 on Mac
Post Reply