Is there a way to copy font colours to other cells?

Discuss the spreadsheet application

Is there a way to copy font colours to other cells?

Postby niacin » Sat May 20, 2017 3:07 am

I'm have a 2 page sheet that I use for my work. The second page is essentially a copy of the first but without cell lines.

In order to make it so I don't have to put the same information twice I have my cells on the second page using "=cell" to copy the text.

I'm wondering if there is a way to have the cell copy font colours as well.
Open Office 3.3
Windows 10
niacin
 
Posts: 3
Joined: Fri May 19, 2017 11:45 pm

Re: Is there a way to copy font colours to other cells?

Postby RusselB » Sat May 20, 2017 5:03 am

The only way that I'm aware of is to use the Paste Special (ctrl+shift+V) with the Formats option selected.
Regretfully this means that the colour(s) will stay the same as pasted, even if you change the colours of the supplying cell.
OpenOffice 4.1.3 and LibreOffice 5.1.3.2 on Windows 7 Pro & Ultimate
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
RusselB
Volunteer
 
Posts: 3988
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Is there a way to copy font colours to other cells?

Postby niacin » Sat May 20, 2017 5:34 am

I was worried about that.

I want to avoid copy and paste, the idea is to input the info once and it automatically shows up in the designated cell.

I was hoping to get around having to colour code both sides, instead of just sticking to working on the one side.
Open Office 3.3
Windows 10
niacin
 
Posts: 3
Joined: Fri May 19, 2017 11:45 pm

Re: Is there a way to copy font colours to other cells?

Postby Zizi64 » Sat May 20, 2017 7:04 am

Use the Cell styles insted of the manual formatting. You can not reference a manually applied property from an another cell directly.

You must use the more advanced tools of the Apache OpenOffice/LibreOffice.

(As you can not reference a manually formatted (shifted) sub- or supercript character. You must use the UNICODE sub an supercript characters if you want to reference a string containing sub- or supercript characters. For example: see the Units [N/m²])

In this case you must use the Cell styles: you can use (apply) them
- manually,
- by a formula,
- by the conditional formatting function,
- by a macro.

And you can create and apply many user defined, parent/child-structured cell styles with colorized fonts, and other desired properties.
Tibor Kovacs, Hungary; LibreOffice4.4.7 on Win7x64Prof.
And the portable versions: LO3.3.0-LO5.4.1 and AOO4.1.3
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: 5772
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Is there a way to copy font colours to other cells?

Postby niacin » Sat May 20, 2017 7:56 pm

Thanks for the reply.

I really need to learn more about those kinds of formatting. I'm not very advanced in my Calc skills over all. I will look into the types you mentioned and see if I can get something to work for me.

I appreciate the input.
Open Office 3.3
Windows 10
niacin
 
Posts: 3
Joined: Fri May 19, 2017 11:45 pm

Re: Is there a way to copy font colours to other cells?

Postby Lupp » Sat May 20, 2017 11:04 pm

If you want to assign a specific format to a cell you can use the STYLE() function if the format properties under discussion are "collected" in a named cell style. However, there is not a standard function returning the cell style of a referenced cell. If you accept some complications[1] concerning the way addressing the source cell, it is not difficult to write a user function for the purpose. Se attached demo.

Relying on user code has disadvantages!

[1] User functions don't get access to cells referenced in parameter positions. If a specific cell is needed as an object it must be accessed based on explicit information about the 'Position' or the 'Name' (address as text).
Attachments
aoo88825GetStyleFromAddressedCell_1.ods
(13.56 KiB) Downloaded 14 times
On Windows 10: LibreOffice 5.4.1 and older versions, PortableOpenOffice 4.1.3 and older, StarOffice 5.2
---
Maybe we might! (Create a powerful UFO: United Free Office)
Lupp from München
User avatar
Lupp
Volunteer
 
Posts: 1385
Joined: Sat May 31, 2014 7:05 pm


Return to Calc

Who is online

Users browsing this forum: touchups and 20 guests