[Solved] Change color of text in a cell from input in a cell

Discuss the spreadsheet application

[Solved] Change color of text in a cell from input in a cell

Postby sksmaster56 » Sat Aug 12, 2017 10:53 pm

Hello everyone,
I think it is obvious that I am new to this forum. I have been a loyal Oo user for years now and have received much help from the forums. This is my first post so please bare with me.

I have been trying to understand how to change the color of text in one cell from input in another cell. I found what I thought was the answer but for some reason I can't get it to work =IF(condition;"PASS";"FAIL")&T(STYLE(IF(condition;"Green_Style";"Red_Style"))).
I have created a spreadsheet for my business and so far it has done what I want it to do until now. What i want to do is take a name from a drop down list in one cell and apply a color change to text in another.
A11 is a list box with

D
FD
PC
MI
Van
TC
AoT
SB
SH

C11 is the cell i would like to change the color in. So if A11 is "SB" or "SH" then turn the text in C11 to green. If A11 is AoT then turn the text in C11 to Blue. Everything else will leave C11 red.

Thank you in advance for your help and understanding of a forum newbe
test01.ods
part of my business spreadsheet
(14.94 KiB) Downloaded 14 times
Last edited by sksmaster56 on Tue Aug 15, 2017 10:05 pm, edited 1 time in total.
OpenOffice 4.1.1
Windows 7 Pro
sksmaster56
 
Posts: 6
Joined: Sat Aug 12, 2017 9:53 pm

Re: change color of text in a cell from input in another cel

Postby robleyd » Sun Aug 13, 2017 1:07 am

The solution proposed in Cell background color change will work for you also.
Cheers
David
Apache OpenOffice 4.1.4 - Windows 7
Apache OpenOffice 4.1.4 - Slackware 14.2 - 64 bit
User avatar
robleyd
Moderator
 
Posts: 1094
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: change color of text in a cell from input in another cel

Postby Zizi64 » Sun Aug 13, 2017 8:01 am

Here is your modified example file. I created some more styles (in Hierarchical order, because the Child styles can inherit properties from the Parend style), and I applied them by the function STYLE() in Column E, and then I applied them by the Conditional Format feature in the Column F.

test01_Zizi64.ods
(18.61 KiB) Downloaded 18 times
Tibor Kovacs, Hungary; LO4.4.7, LO5.3.7 on Win7x64Prof.
PortableApps, WinPenPack: LO3.3.0-LO5.4.3 and AOO4.1.4
Please, edit the topic's initial post, and add the word "[Solved]" at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 6085
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: change color of text in a cell from input in another cel

Postby sksmaster56 » Mon Aug 14, 2017 5:16 pm

Zizi64,
Thanks for your help but for some reason I cant get it to work the way I want it to.
I am sending a whole sheet. B11-B60 should be black. That is the place where I put what the driver got paid. C11-C60 is the credit if the customer paid with a credit card. If C11 has "Aot" "SB" "SH" then those are in house credit that will be billed. I tried to use the formula after i made some styles but it doesnt change the color of C11. It puts the number wherever I put the formula and applies the color change there. I have put the formula in V11-V60. When you see the whole sheet you may understand more of what I need. Thank you
OpenOffice 4.1.1
Windows 7 Pro
sksmaster56
 
Posts: 6
Joined: Sat Aug 12, 2017 9:53 pm

Re: change color of text in a cell from input in another cel

Postby sksmaster56 » Mon Aug 14, 2017 5:19 pm

I forgot to attach the sheet so here it
Attachments
Newest Dispatch sheet 08-12-17.ods
(16.26 KiB) Downloaded 9 times
OpenOffice 4.1.1
Windows 7 Pro
sksmaster56
 
Posts: 6
Joined: Sat Aug 12, 2017 9:53 pm

Re: Change color of text in a cell from input in another cel

Postby Zizi64 » Mon Aug 14, 2017 6:13 pm

I tried to use the formula after i made some styles but it doesnt change the color of C11.

If the C11 has a numeric content that YOU typed-in, then you can not use a FORMULA in the C11 (because it is contains a numeric value). In this case you must use the "Conditional Format" way instead of the "apply a STYLE() by a formula".
Tibor Kovacs, Hungary; LO4.4.7, LO5.3.7 on Win7x64Prof.
PortableApps, WinPenPack: LO3.3.0-LO5.4.3 and AOO4.1.4
Please, edit the topic's initial post, and add the word "[Solved]" at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 6085
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Change color of text in a cell from input in another cel

Postby sksmaster56 » Mon Aug 14, 2017 8:14 pm

Thank You Zizi64, I will try that
OpenOffice 4.1.1
Windows 7 Pro
sksmaster56
 
Posts: 6
Joined: Sat Aug 12, 2017 9:53 pm

Re: Change color of text in a cell from input in another cel

Postby sksmaster56 » Mon Aug 14, 2017 8:34 pm

Zizi64,
I guess I am not understanding conditional formatting. I will keep trying.
OpenOffice 4.1.1
Windows 7 Pro
sksmaster56
 
Posts: 6
Joined: Sat Aug 12, 2017 9:53 pm

Re: Change color of text in a cell from input in another cel

Postby sksmaster56 » Tue Aug 15, 2017 9:52 pm

Thank you Zizi64, conditional formatting worked.
OpenOffice 4.1.1
Windows 7 Pro
sksmaster56
 
Posts: 6
Joined: Sat Aug 12, 2017 9:53 pm


Return to Calc

Who is online

Users browsing this forum: acknak, mcrogers123, Yahoo [Bot] and 56 guests