You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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 1, 2019 10:55 AM

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

21 replies
Question marked as Top-ranking reply

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 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.


Aug 3, 2019 2:14 AM in response to curlydog

Hi curlydog,


Catching up on the conversation:


I have attached the rules for the 8 categories of adjective endings.

When sorting to group the same colours together, you are actually grouping by category. If you have numbered these eight categories in a 'standard' order, it may make more sense to sort the entries by Type than by colour. That way the colour groups will be listed in the same order as on the table on which you listed the types and their assigned colours.


[I]n my spreadsheet Sheet 1 (has) a table of Gk to Eng; Sheet 2's table is Eng to Gk; Sheet 3's is A to Ω, Sheet 4's is A to Z.

Taking the table on Sheet 1 as your Main table, the only change needed in the table on Sheet 2 is to exchange the positions of the columns of Greek and English words. As no mention is made of changing the order of these two tables, I would assume a 'logical' order would be by type, which would also group them by colour.


Transferring the content of the table can be done with a simple cell reference to the same cell in the source table (eg. in A1 of the Eng-Grk table, press = to open the formula editor, then type A1

Clck the green checkmark to confirm the formula and close the editor.

Fill the formula right to the last column (where you should, when you release the mouse button, see the content of the last cell in row 1 of the Main table.

Go back to the column containing the English words. Double click the cell to open the formula Editor, Take note of the Column letter in the cell reference, then replace that reference with the column letter of the column of the Main table containing the Greek words.

Make the opposite change in the first cell in the column containing the Greek words, changing the column reference to the column of the main table containing the English words.


Select all of row 1, then fill the formula down to the last row of the table. Add rows if needed to get to the content of the last row of the Main table.


But I haven't yet found a way to automate the alphabetising to be honest. That's my next challenge.


As three of the tables are filled by copying rows of data from the table on Sheet 1, sorting the final two could prove an interesting exercise. Tables filled from other tables by formulas are inherently resistant to post transfer sorting; if the tables are sorted on values that is dependent on the position of that value on the source table, sorting the receiving table will immediately trigger a recalculation, which will return the original values in the original position in the 'resorted' table.


For this stage, my simplest suggestion is to:

  • Select all cells of the Greek to English table on Sheet 1. Copy,
  • Go to Sheet 3, and select (one click) cell A1 of the Table that i to hold the Α-Ω sort.
  • Go to the Edit menu and choose Paste Formula results
  • Sort the table on the Greek column.


Repeat with the English to Greek table on Sheet 2

  • Select all cells on the source table. Copy.
  • Select cell A1 of the table on Sheet 4
  • Edit > Paste Formula Results
  • Sort the table on the English column.


ALL content editing will be done on the Main table, on Sheet 1.

You will need to add rows to the table on Sheet 2 to match the number of rows in the Main table.

The tables on Sheets 3 and 4 will automatically expand to include as many rows of data (and headings) as are present in the table that the data has been pasted from,


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


Since each colour matches a specific Type number, grouping by colour is equivalent to grouping by Type number. do this grouping by sorting on type number.


Regards,

Barry

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.



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.

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 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 9:47 AM in response to Barry

Hi Barry,


In my first explanation I didn't actually say much about the first sheet where I enter the data. It actually isn't random. The list is constantly evolving and I'm now up to about 600 adjectives which, where possible, have been manually grouped by meaning and opposites eg. fat/thin, light/dark or all the adjectives that mean "sad" etc. So whenever I add a new one, I insert a new row.

The second sheet is automated to deal with this insertion and it also flips the columns using this formula:


Regarding the Alphabetising - I currently do exactly what you suggest. ie copy over and sort it manually using the sort feature at the top of each column. I had just hoped I could automate it somehow. No worries.


I suppose regarding a new Sheet that puts them into their categories - leaving the colours there just for catching ones attention rather than sorting - I could add a new column in the first Sheet that allows me to allocate a number as to which category the new addition fits into. Then maybe I could pull each of these categories into their own sheet or table.....I'm just thinking aloud here. Not thought how exactly I would do this as yet.


Thank you for thinking about this query. Much appreciated.


curlydog

Jul 31, 2019 6:37 AM in response to curlydog

curlydog wrote:

I want the formula to also take the cell background format too


Not possible via formula. Are you having trouble rearranging columns via the Numbers interface? It's really easy. Just select the column and with the column selected move the cursor slightly so the column "lifts" and then drag it into the position you want.


BTW, when you say "sheet" I think you really mean table, right? Tables have cells but sheets don't. Sheets have a blank canvas on which you can place tables and other objects like text boxes and shapes.


SG


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 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




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

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. But, yes I see you get choices as to what you can put onto a sheet in Numbers, I just happen to only be using sheets with tables on them - like Excel.

I'm trying to migrate over to Numbers, but often when sharing stuff, I have to export out to an excel spreadsheet since not everyone has a mac of course.


What you suggest doing, is what I am having to revert to, in order to make it happen. I'm trying to automate it since I have 4 Sheets with this data in different arrangements and I enter words on a daily basis. I had just hoped I could save time by automating it. But if it isn't possible then it isn't. But perhaps it would be nice if it was. So I've put in a feature request to Apple.


Thanks for your help though. I can stop searching for a way to make it so.


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

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.