Copy cell format in a formula, Numbers

I have a Numbers spreadsheet with several sheets which I use to study Greek adjectives. I enter the data on the first sheet and have a cell fill colour code to help identify certain word ending types. The second sheet flips the columns from Greek to English, the other way around using a formula. The third sheet Alphabetises the same list.

I want the formula to also take the cell background format too so I don’t have to do it manually every time.

Is there a way to do this?


Thanks

curlydog

MacBook Pro Retina

Posted on Jul 31, 2019 12:39 AM

Reply
Question marked as Top-ranking reply

Posted on Aug 2, 2019 4:42 AM

Hi curlydog,


I see that my good friend Barry beat me to the reply. But here is something I prepared earlier, so here we go.

I see two separate aims:

  • Aim 1 is to automatically apply a distinct colour fill to distinguish the adjective endings;
  • Aim 2 is to sort tables according to their cell colour fill.


Aim 1: automatically apply a distinct colour fill to distinguish the adjective ending

As Barry said, use Conditional Highlighting with "text ends with".

I was not able to find a Greek font, so I used English style letters and did my best to match. Don't laugh 😀.


Here is a screenshot of some of the Conditional Highlighting rules.



Aim 2: sort tables according to their cell colour fill.

Not possible to sort on a cell format. However, we can add another column that contains values (text) which will sort the table.



enter these formulas in C2 to G2 and fill down to the end of the columns.

C2 =LEN(A2)

D2 =FIND(",",A2)

E2 = D2−2

F2 ="-"&MID(A2,D2−2,C2−D2+3)

G2 =VLOOKUP(F2,Lookup::A:B,2,0)



Now you can sort the table by Column G to bring all the colours (endings) together



Regards,

Ian.


21 replies
Question marked as Top-ranking reply

Aug 2, 2019 4:42 AM in response to curlydog

Hi curlydog,


I see that my good friend Barry beat me to the reply. But here is something I prepared earlier, so here we go.

I see two separate aims:

  • Aim 1 is to automatically apply a distinct colour fill to distinguish the adjective endings;
  • Aim 2 is to sort tables according to their cell colour fill.


Aim 1: automatically apply a distinct colour fill to distinguish the adjective ending

As Barry said, use Conditional Highlighting with "text ends with".

I was not able to find a Greek font, so I used English style letters and did my best to match. Don't laugh 😀.


Here is a screenshot of some of the Conditional Highlighting rules.



Aim 2: sort tables according to their cell colour fill.

Not possible to sort on a cell format. However, we can add another column that contains values (text) which will sort the table.



enter these formulas in C2 to G2 and fill down to the end of the columns.

C2 =LEN(A2)

D2 =FIND(",",A2)

E2 = D2−2

F2 ="-"&MID(A2,D2−2,C2−D2+3)

G2 =VLOOKUP(F2,Lookup::A:B,2,0)



Now you can sort the table by Column G to bring all the colours (endings) together



Regards,

Ian.


Jul 31, 2019 12:38 PM in response to curlydog

curlydog wrote:

I see that what Excel calls Sheets, Numbers calls Tables. Not sure how logical that is but hey.... confusing sometimes going between the different programmes. I use both, and Google Sheets too - just to confuse matters even more.


Not quite. A sheet in Excel is similar to a sheet in Numbers. The main difference is that a Numbers sheet contains a blank canvas on which you place tables and other objects. An Excel sheet, instead of a blank canvas, has a big grid of cells within which you can place tables of various kinds (Excel Tables, Pivot Tables, etc.) Tables came late in Excel's development, whereas the Numbers design revolves around tables. It's easy to have many of them on one sheet because you aren't constrained by a big grid of cells. Check out the templates at File > New in your menu for examples.


I'm not sure I entirely understand what you are doing with the vocabulary tables but if you are just flipping the order of the columns then after updating a table I would just duplicate it (click the concentric circles "bulls-eye" upper left, command-c to copy, click on the canvas, and command-v to paste) and then drag the columns into position as described in my post above. This only takes a second or two, keeps the cell formatting, and thus is probably more efficient that trying to automate via formula.


SG




Aug 1, 2019 3:35 AM in response to curlydog

Hi curlydog,


Yes I see what you mean. I am still leaning towards Conditional Highlighting as a possible solution. How do you decide what cell colour fill to apply? If you can give us the rules that you use, perhaps we can turn them into rules that Numbers will follow.


I know nothing about Greek, but I think I see a pattern in your screen shot. Does everything after the first comma determine the cell colour fill???


Regards,

Ian.

Jul 31, 2019 5:42 AM in response to Yellowbox

That's a nice idea Yellowbox (Ian) but it's rather complicated for a programme to grasp I think - see the screenshot 1. The adjectives fall into different patterns of endings. So I colour them manually on the first sheet but I don't want to do it on every sheet if possible. Also below is the formula I use to switch the columns over, in which I would love it if it also pulled the formatting through as well.



Thanks for your suggestion.



Jul 31, 2019 12:20 PM in response to SGIII

Ah it's not possible - that explains why I can't make it happen then. Shame because when you copy a formula down cells in a column they take the formatting of the the cell from which you copy.


Sorry, yes when I say sheet, I accidentally used the familiar terminology that Excel uses to describe - well - different sheets within the same document. A table is something else in Excel, so I'm used to that terminology. I see that what Excel calls Sheets, Numbers calls Tables. Not sure how logical that is but hey.... confusing sometimes going between the different programmes. I use both, and Google Sheets too - just to confuse matters even more.


No my problem is not about moving columns around - nothing that simple I'm afraid. So to use Numbers terms, I have a spreadsheet document with multiple "Tables" (sheet or page), and I enter words into the first one and the second one automatically adds the same entry but showing it the other way around - English to Greek, the next one works alphabetically etc. But in order to differentiate between the types of ending category that the word falls into, I colour code it in the first "table", and want it to take that colour with it into the next "table" etc....


Thanks


curlydog


Jul 31, 2019 9:01 PM in response to curlydog

curlydog wrote:

Hi SGIII,

Ok to back track then - I've just gone back to making a fresh spreadsheet and Numbers does call them sheets too. So no confusion then, I did mean Sheets and not Tables.


Are you sure you're not still confused? Sheets in Numbers do not have cells. You're entering your data in tables, not sheets.


Anyway, I'm still confused trying to figure out exactly what you are trying to do. Switching the order of columns is so easy (much easier in Numbers than in Excel) that I'm not sure what new feature is needed! Hopefully you have given Apple a clearer idea.


SG



Aug 1, 2019 2:23 AM in response to SGIII

Hi SG,


No I’m not confused, honestly. You had me worried for a minute that I was using the wrong terminology tho.


I have multiple Sheets in which the data - which is in Tables - needs to be displayed in different ways (Eng-Greek, Greek to Eng, A -Z, Α -Ω ), and I just want to enter it on the first sheet only and not have to manually flip stuff around on the other Sheets, every time I add a new word.

I can pull the cell content through on subsequent sheets, but it won’t take the colour formatting of the cell with it.

If I can achieve pulling this colour coding through then it not only saves me time, but I can then expand the Spreadsheet to sort by the colour code and place the adjectives in their relative groups in a new Table on a new Sheet.

See my previous pic.


Do you see see what I mean?


Thanks

curlydog

Aug 1, 2019 7:53 AM in response to Yellowbox

Hi Ian,


You could be right.


I have attached the rules for the 8 categories of adjective endings. I'm giving the endings in their masculine/feminine/neuter singular forms in my spreadsheet. Adjectives have to agree with the noun in number and gender in Greek. English is so much easier!

So in my spreadsheet Sheet 1 is a table of Gk to Eng; Sheet 2 is Eng to Gk; Sheet 3 is A to Ω, Sheet 4 is A to Z. But I haven't yet found a way to automate the alphabetising to be honest. That's my next challenge.

Finally I want to use the colours to pull the words into their correct groups, in another table in another Sheet.



Thanks

curlydog


Aug 1, 2019 10:55 AM in response to curlydog

According to the list in column D of the table in your screenshot,Ian's suggestion of using conditional highlighting will work well, using a set of seven rules.


Each of the rules will have this structure:

Text ends with -f, -n

or

Text ends with m, -f, -n

Where m, f, and n are the (masculine), feminine and neuter forms for each type.


The masculine ending i optional as the feminine, neuter pair is distinct for each type, so the order of applying the rules is not significant.


Select all of the non-header cells in the column where the colours are to be applied, then create the rules.



Takes you to:


Where you enter the appropriate string containing the text starting with the first - and going to the end of the entry for that Type.


Choosing Custom Style opens the Colors panel, where you can set a custom fill colour, or use the dropper tool (lower left) to copy the colour from an existing cell.


(colours matching one of the listed samples can be set by choosing that 'color fill' in the menu.


A rule is needed for each type except the first. If the content of the cell does not end with one of the tested strings, no conditional highlighting will be applied.


Regards,

Barry


PS: that space in front of the feminine ending in Type 5 will prevent the conditional highlighting of that cell, as "- f…" is not a match to "_f…" Take care regarding typos!

B

Aug 2, 2019 6:53 AM in response to Yellowbox

Hi Barry and Ian,


So I've achieved a column with the conditional highlighting relating to the endings....thank you that works.

Onto the next step then Ian.....this may take a bit longer.

But just before that can I ask do you know a way to automate alphabetising? Currently I'm manually adding into these sheets and then sorting manually.


thanks

curlydog

Aug 2, 2019 10:54 PM in response to curlydog

Hi curlydog,


Columns C, D and E are a long-winded way to extract the endings (in columnF). You could sort the table by column F, but I thought a Lookup table for column G would make it easier for humans to understand (sorting by colours).


You can hide these intermediate columns:


The Lookup table can be anywhere in the document (perhaps on its own sheet).


Regards,

Ian.

Aug 3, 2019 12:21 AM in response to Yellowbox

Thank you Ian,


I took a longer look last night and this is great. I see what you’re doing now. Might it be simplified by just looking at the feminine and neuter endings, ie the ones after the first comma, since they form a unique set in themselves? Or is there nothing to be gained by doing this?

I'm going to re-create this in my spreadsheet today.....I could be gone some time. Haha.


I just love the way you thought around this problem. Thank you for solving it for me. I feel that I know Numbers a little better now, having been an excel person for sometime.


curlydog

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Copy cell format in a formula, Numbers

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.