Sort rows by fill color?

Is it possible in Numbers to sort rows based on the row fill color? There are only 2 colors the rows have as background (fill), and it would save time to sort based on the highlighted row. Any ideas?
Thank you-

I agree with jerrold.
I will certainly not ask Apple for such a feature.
Here is a script which may give you an efficient response.
property columnOffset : 2
tell application "Numbers"
activate
set {rName, tName, sName, dName} to my getSelection()
if (character 2 of rName) as text > "9" then
set columnLetter to text 1 thru 2 of rName
else
set columnLetter to character 1 of rName
end if
set twoNames to my decoupe(rName, ":")
set {colNum1, rowNum1} to my decipher(item 1 of twoNames)
set columnToSort to colNum1 + columnOffset
tell document dName to tell sheet sName to tell table tName
set myColor to background color of (get properties of range rName)
set nbRows to count rows
repeat with r from 1 to 14 --nbRows
set val to background color of (get properties of range (columnLetter & r & ":" & columnLetter & r))
set val to (val is myColor)
set value of cell r of column columnToSort to val
end repeat
end tell
end tell
--=====
on getSelection()
local mySelectedRanges, sheetRanges, thisRange, _, myRange, myTable, mySheet, myDoc, mySelection
tell application "Numbers"
activate
tell document 1
set mySelectedRanges to selection range of every table of every sheet
repeat with sheetRanges in mySelectedRanges
repeat with thisRange in sheetRanges
if contents of thisRange is not missing value then
try
--return thisRange --poorly formed result
thisRange as text
on error errMsg number errNum
set {_, myRange, _, myTable, _, mySheet, _, myDoc} to my decoupe(errMsg, quote)
--set mySelection to (a reference to (range rn of table tn of sheet sn))
return {myRange, myTable, mySheet, myDoc}
end try
end if -- contents…
end repeat -- thisRange
end repeat -- sheetRanges
end tell -- document 1
end tell -- application
return {missing value, missing value, missing value, missing value}
end getSelection
--=====
on decipher(n)
local letters, colNum, rowNum
set letters to "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
if (character 2 of n) as text > "9" then
set colNum to (offset of (character 1 of n) in letters) * 64 + (offset of (character 2 of n) in letters)
set rowNum to (text 3 thru -1 of n) as integer
else
set colNum to offset of (character 1 of n) in letters
set rowNum to (text 2 thru -1 of n) as integer
end if
return {colNum, rowNum}
end decipher
--=====
on decoupe(t, d)
local l
set AppleScript's text item delimiters to d
set l to text items of t
set AppleScript's text item delimiters to ""
return l
end decoupe
--=====
Select a cell with the color to use in the sort.
Run the script.
It will fill the column whose offset from the selected one is defined by the property 'columnOffset'
If the background of the cell in the source column is the searched one the value will be 1
if the background is not this one, the value will be 0.
So it will be easy to use a condition.
Yvan KOENIG (from FRANCE mardi 10 mars 2009 20:39:44)

Similar Messages

  • Is it possible to sort rows by font color in Numbers ?

    Is it possible to sort rows by font color in Numbers ?

    CC,
    You probably had something in mind when you applied the colors to the text. It's always best to record the conditions directly rather than to indicate them indirectly by by use of color.
    You can use Conditional Formatting to do some color coding based on the condition. You might even find that it's easier to let the conditional format tool than to assign the colors manually.
    Jerry

  • Can I change the fill color of an entire row based on what's selected in a pop-up menu in the first cell?

    I have a pop-up menu in the first cell of every row with three choices (and I may add more at a later date).  I want the fill color of the row to change depending on which thing is selected.  Is this hard to do?

    Hi,
    In essence the same as Wayne's answer, but with a slight modification to fit  to duplicate your 'color the whole row' specification. The final result, with Table 2 slid behind Table 1, is shown.
    Table 2 is a single column table with the same number of rows as Table 1. The table is resized to match the full width of Table 1.
    In A2, use the formula =Table 1::A2 to copy the value from that cell in Table 2. Fill the formula down through the rest of the column.
    Select all the cells in Table 2 (except the header row), and apply conditional formatting rules such as those below.
    Note that the Conditional Format rules are set to apply the same colour to text and fill in the cell, so that the text disappears.
    When Table 2 is ready, select it, then go Arrange > Send to Back.
    Before sliding Table 2 behind Table 1, Select Table 1 and use the Table Inspector to set the Cell Background to None (see red arrow in illustration). If This table has a Header column, you need to select the header cells independently and again set the Cell Background to None.
    Now select Table 2 and drag it to a position partially under Table 1. When you see the blue alignment guides on both sides, or at the top and bottom, of Table 1, release the mouse button and use the arrow keys to nudge Table 2 into its final position.
    Regards,
    Barry

  • Three Numbers questions:how do you change the auto default background or fill color from white to another color to use in multiple succeeding operations?  what is the formula to express the ratio of two numbers as a percent?

    Numbers questioons:
    -how do I change the automatic default background fill color so it stays a non white color?
    -what is the formula to express the ratio of two numbers as a percentage?
    -how do I create a signal formula to be sue against an entire column of data (for example, if I wanted to multiply the each cell in the column by the number 10)?
    -I have created a spreadsheet in Numbers with header and rows labelled and it contains formulas as well.  I now want to create a new 'blank' of this template with same header and row names and formulas, but without the cell entries from my earlier exerciser so I can use again in the future. How do I do this?

    Hi Matt,
    For short columns, the easiest method is to select the cell containing the formula, then grab the fill handle (small circle at the botom right of the selected cell) and drag down.
    For long columns, use either Jerry's suggestion (copy/paste) or Insert > Fill > Fill Down.
    Copy/Paste:
    Select the cell containing the formula. Copy
    Select from the cell containing teh formula to the end of the column. Paste.
    Fill Down:
    After entering the formula, and pressing enter...
    Click on the column reference tab to select the whole column.
    Command click on each cell above the one containing the formula to remove it from the selection.
    When cell with the formula is the top cell in the selection, go Insert > Fill > Fill Down.
    Pick whichever is easiest.
    Regards,
    Barry

  • Fill color picker issue

    When I double click on the fill color in the tool bar the color picker window opens. Unfortunately it is opening to a color that is not the color of my fill such as this orange here instead of the green. I am wondering if I have some sort of color theme option turned on somewhere? Any help to get this back to normal would be greatly appreciated.

    Thank you, felt like I was going crazy
    From: Jacob Bugge
    Sent: Monday, August 11, 2014 10:29 AM
    To: steve sheets
    Subject:  fill color picker issue
    fill color picker issue
    created by Jacob Bugge <https://forums.adobe.com/people/Jacob+Bugge> in
    Illustrator - View the full discussion
    <https://forums.adobe.com/message/6629962#6629962>

  • Controlling mc fill color externally

    I have a project that demands control of the fill color of a
    rectangle shaped mc externally. So the user would have the control
    to change the fill color of a movie clip by editing something
    externally, not having to edit the flash file. Is this
    possible?

    You can pass variables into a Flash movie using URL variables
    appended to the path of the SWF file (e.g. "mySWF.swf?myVar=value")
    or using FlashVars. Either way, that variable is available at the
    root level of your movie as soon as it loads. So you could pass the
    hex value into the movie and change the MC color accordingly.
    You could also just give your user some sort of input in your
    Flash movie that would set the color of the MC.
    Hope that helps!

  • Not able to color different rows with different colors in a column of table

    Hi,
    I am trying to to display different rows with different colors in a column of the table based on some decode condition.
    I have gone through the following threads :
    Can we colour the rows in the column of a table
    Changing Color of a value in a column
    This is what i have done :
    1.Added the following code to custom.xss(changed the name to Custom.xss as suggested in one of the above threads) --- in path ---- jdev\myhtml\OA_HTML\cabo\styles
    <style selector=".1">
    <includeStyle name="DefaultFontFamily"/>
    <property name="font-size">11pt</property>
    <property name="font-weight">Bolder</property>
    <property name="color">#008000</property>
    <property name="text-indent">3px</property>
    </style>
    <style selector=".2">
    <includeStyle name="DefaultFontFamily"/>
    <property name="font-size">11pt</property>
    <property name="font-weight">Bolder</property>
    <property name="color">#FFFF00</property>
    <property name="text-indent">3px</property>
    </style>
    2. Sql query of the VO is :
    select comments,role ,decode(role,'REQUESTER','1','2') Colorattr from xxat_sars_action_history where request_id = :1 and event_name = :2 and action_code <> 'PENDING'
    order by sequence_num desc
    3. Coded the following in the process request of the controller:
    OATableBean table = (OATableBean)webBean.findIndexedChildRecursive("CommentsTB");
    OAMessageStyledTextBean roleBN = (OAMessageStyledTextBean)webBean.findIndexedChildRecursive("role");
    OADataBoundValueViewObject cssjob = new OADataBoundValueViewObject(roleBN,"Colorattr");
    roleBN.setAttributeValue(oracle.cabo.ui.UIConstants.STYLE_CLASS_ATTR, cssjob);
    where 1 and 2 form the colors ( i have even tried with 'Red' and 'Yellow'...as it was not working replaced with 1 and 2)
    4.The query returns data fine with corresponding 1 and 2 values.
    But different colors are not getting reflecting on to the UI.
    I am testing this on my local jdev.
    Please do let me know if i am missing something.
    Thanks ,
    Sushma.

    Any Clues please.....
    Thanks,
    Sushma.

  • How to show alternate rows in different colors?

    How to show alternate rows in different colors?
    Thanks

    you should put these kind of stmt in the if condition for even row and odd row
    <xsl:attribute xdofo:ctx="block" name="background-color">yellow</xsl:attribute>
    this should help you
    Re: About highlight row
    http://blogs.oracle.com/xmlpublisher/2007/08/09
    http://garethroberts.blogspot.com/2007/09/bi-publisher-color-list-and-cell.html

  • How can I apply a current fill color to a stroke, then adjust that stroke color's build?

    Hi all, I'm trying to figure out a way to automate a simple, yet repetative process I do countless times a day. Ideally, I'd like to tie it to a keystroke to speed up my workflow.
    I work on line art and colorways for footwear, so the way I'm coloring these shapes and strokes helps to break apart the different materials and pieces of the shoe.
    While coloring line art, I work with Pantone spot colors as fills for closed path objects. I then have to manually apply that same color to the stroke, set the stroke to 0.5px weight, convert that spot stroke color to CMYK, and add 15% to the K value.
    I found some code in an older post for applying the actively selected object's fill color to the stroke, but I'm having but I'm having trouble with the next step of figuring out how to take that spot stroke color and convert it to a CMYK build that I can then add 15% black to. Is this something that's even possible? I've spent about an hour playing with the script and have only had luck matching the fill color or turning the stroke white. Thanks for the help!

    ok try this one, I added the spot color option
    // make stroke color same as fill color + 15% black increase
    if ( app.documents.length > 0 && app.activeDocument.pathItems.length > 0) {
        for (var a=0; a<app.selection.length; a++) {
            try {
                    var sel = app.selection[a];
                    var fillcolor = sel.fillColor;
                    if (fillcolor.typename == "CMYKColor")
                        var cmkycolor = fillcolor;
                    else if (fillcolor.typename == "SpotColor")
                        var cmkycolor = fillcolor.spot.color;
                    var col = new CMYKColor;
                    col.cyan = cmkycolor.cyan;
                    col.magenta = cmkycolor.magenta;
                    col.yellow = cmkycolor.yellow;
                    var black = cmkycolor.black + cmkycolor.black +15;
                    col.black = black>100 ? 100 : black;
                    sel.strokeColor = col;
                    sel.strokeWidth = 0.5;
            catch (e){alert(e)

  • How to use AppleScript to set "character fill color" in Pages 5.2?

    For Pages 5.2 on OSX 10.9.3, what is the correct applescript for changing the "character fill" of text in pages. 
    If you highlight text, you do this via your mouse in the inspector by clicking "style," "advanced option (the gear wheel to the right of bold, italics, and underline), "character fill color (clicking on the multi-color circle, not the dropdown menu), and then choosing a color that comes up in the "colors" dialogue box.
    I've looked all over and cannot find how to use applescript to set the character fill color in pages. 
    In some examples (not directly related) I see "character fill" used. 
    In others, I see "colorfill." 
    Basically, I want to use applescript, embedded in a keyboard maestro macro, to change the background color of the text (not the text color itself) to particular colors. 
    Given the changes and updates to Pages this year, and to applescript, what's the easy way to do this?
    Thanks!
    Chuck

    Pages v5.2 still does not include selection-object, or character background color entries in its AppleScript dictionary, as does Pages ’09. Indirectly, using System Events, you can get the text selection in Pages v5.2, but then you can do nothing to change the selection. No assurances as to if or when Apple will mature the AppleScript dictionary support for Pages v5 series.

  • How can I select and delete the fill color (white background) of a live trace (B&W) with in an actio

    How can I select and delete the fill color (white background) of a live trace (B&W) with in an action set?
    Illustrator CS4 in windows XP.

    Maybe Li[ve trace] is not t]he way[ to go
    I have some suggestion one leave it as is and use a blending mode of multiply to give it a color background like this
    leave it as is make it a grayscale tiff import int Illustrator and color it it in Illustrator like this
    Or trace over it with the brush tool aand then give it a color ground.
    Or do the original over and do a cleaner job with no tone or a minimum of tone. Then Live trace.

  • Changing the button fill color in Captivate 7?

    I am pretty sure that when I used Captivate 6 and I created a button, there was an option in the Properties pane to allow me to change the fill color of the button. I am using Captivate 7 now, and I no longer see this option. Under the "General" tab, it allows me to change the button type, caption, make it transparent, or allows me to see button widgets. Did they remove the ability to simply change the fill color of a button?

    I'm wondering if this is something that was maybe added in a service release. Either that or you may need to reset your preferences.
    Mine has a section titled Fill & Stroke as shown below.
    Cheers... Rick

  • [AS] CS3- Find any text with style, then replace that text with a new applied fill color.

    I am trying to find the simplest way in cs3 to find any text with style, then replace that text with a new fill color. I can find text and change text. I can find a style and change it to a new style. I can't seem to find a style and change the applied fill color. I do not want to change the properties of the style, just the applied color. Yes, I want the + sign, for now. I know, why not update the style, I am not allowed to. Any help would be great. Since the search is not available, I need a new response.
    Thanks.

    You can work around the bug by just doing a find, then looping through the<br />results, changing the color one at a time. It'll be a fraction slower, but<br />should do the trick:<br /><br />tell application "Adobe InDesign CS3"<br />    set find text preferences to nothing<br />    set properties of find text preferences to {applied paragraph style:"The<br />name"}<br />    set theFinds to find text document 1<br />    repeat with i from 1 to count of theFinds<br />        set properties of item i of theFinds to {fill color:"Replace color"}<br />    end repeat<br />end tell<br /><br />The bug is fixed in CS4, BTW.<br /><br />-- <br />Shane Stanley <[email protected]><br />AppleScript Pro Florida, April 2009 <a href=http://scriptingmatters.com/aspro>

  • Create a Panel skin (Spark) with a background fill color I can pass as a parameter

    Hi,
    I'm trying to create a Panel skin (Spark) with a background fill color I can pass as a parameter.
    (See in bold:)
    <?xml version="1.0" encoding="utf-8"?>
    <s:SparkSkin name="CustomPanelSkin"
                                   xmlns:fx="http://ns.adobe.com/mxml/2009"
                                   xmlns:s="library://ns.adobe.com/flex/spark"
                                   xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
                                   blendMode="normal">
              <s:states>
                        <s:State name="normal" />
                        <s:State name="disabled" />
                        <s:State name="normalWithControlBar" stateGroups="withControls" />
                        <s:State name="disabledWithControlBar" stateGroups="withControls" />
              </s:states>
              <fx:Metadata>
                        [HostComponent("spark.components.Panel")]
              </fx:Metadata>
              <s:Group left="0" right="0" top="0" bottom="0">
                        <s:Rect
                                  left="0" right="0"
                                  top="0" bottom="0"
                                  radiusX="12" radiusY="12">
                                  <s:fill>
                                            <s:SolidColor color="#184c81" />
                                  </s:fill>
                        </s:Rect>
                        <s:Group id="contents"
                                             left="1" right="1" top="1" bottom="1">
                                  <s:layout>
                                            <s:VerticalLayout gap="0" horizontalAlign="justify" />
                                  </s:layout>
                                  <s:Group id="contentGroup"
                                                       width="100%" height="100%" minWidth="0" minHeight="0">
                                  </s:Group>
                        </s:Group>
              </s:Group>
    </s:SparkSkin>
    From what I read I should create a subclass, but there is not much material on the subject.
    I would later on want to use this skin in many Panel controls I have in my application.
    Thanks for the help.

    Did you read this?
    http://www.adobe.com/devnet/flex/articles/flex4_sparkintro.html

  • I can select a rating and a color label for my images, but I can not sort by rating and color label.

    I can select a rating and a color label for my images, but I can not sort by rating and color label. when I click on the filter drop down, color label is not one of the options.  how do I get both ratings and color lables as an option to sort with.

    You can Filter (not sort) on both color label and rating if you want, open the Filter Bar with the backslash key, then click on Attribute, and then select the stars and color label of interest. If you really meant "sort" and not filter, then you can't do this in Lightroom.

Maybe you are looking for