Colours etc. Progamming

Creating a macro - Writing a Script - Using the API

Colours etc. Progamming

Postby aston.fearon » Sat Jul 07, 2018 4:11 pm

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
aston.fearon
 
Posts: 3
Joined: Tue Jul 03, 2018 6:17 pm

Re: Colours etc. Progamming

Postby Zizi64 » Sat Jul 07, 2018 7:29 pm

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; LO4.4.7, LO6.1.6 on Win7-10 x64Prof.
PortableApps, winPenPack: LO3.3.0-6.2.4; AOO4.1.5
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: 7964
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Colours etc. Progamming

Postby Zizi64 » Sat Jul 07, 2018 7:37 pm

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; LO4.4.7, LO6.1.6 on Win7-10 x64Prof.
PortableApps, winPenPack: LO3.3.0-6.2.4; AOO4.1.5
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: 7964
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Colours etc. Progamming

Postby aston.fearon » Mon Jul 09, 2018 10:33 am

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
aston.fearon
 
Posts: 3
Joined: Tue Jul 03, 2018 6:17 pm

Re: Colours etc. Progamming

Postby Zizi64 » Mon Jul 09, 2018 10:55 am

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; LO4.4.7, LO6.1.6 on Win7-10 x64Prof.
PortableApps, winPenPack: LO3.3.0-6.2.4; AOO4.1.5
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: 7964
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Colours etc. Progamming

Postby aston.fearon » Mon Jul 09, 2018 11:16 am

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
aston.fearon
 
Posts: 3
Joined: Tue Jul 03, 2018 6:17 pm


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 1 guest