Sorting messes up formulas such as countif

I like to use CountIF in the Windows version of Excel to enumerate items in a list and quickly pick out the first unique item to shorten lists of mostly duplicate information. But it seems that Numbers is not as robust in this practice of mine.
To demonstrate, create a list of random letters (making sure some of them are duplicates). In cell b2, create the following formula: =COUNTIF(A$1:A2,A2), and fill down. You should get something like this:
Note how the countIF formula changes for each row. This is expected.
Now I sort Ascending by the Letter collumn.
and then I get this mangled form:
which is just about useless. The expected form of the formula for it's new location in the list should be =COUNTIF(A$1:A8,A8). You can even see how the new formula has the exact same "selection" from before, but it's all mangled and cut up in such a way that even Numbers itself can't understand.
Numbers 09, version 2.0.2 (322)
I also filed this as a bug report on the Numbers Feedback page.
-Mike

I do not know when I'd ever want references to be linked to the exact cell.
Since I'm a Desktop Support tech, I like to get used to many programs that do similar functions and try to solve the same problems in each so I'm not tied down by any one option. But this turned out to be a problem that was not supposed to be one.
The problem I see is that Numbers allows Excel importing, but does not respect this behavior. I understand the argument that Apple wants to do it their way, but even OpenOffice.org doesn't have this issue (although you have to get used to using semicolons instead of commas). Google Docs also behaves the same as Excel and OOo in this matter. I'd be shocked that any other spreadsheet application with Excel document support would do this sort/cell-reference issue "the Apple way".
Indirect is a function in Excel too. It's useful for conditional formatting with a formula that looks at data in only one column.
But, without the ability to easily generate letters based on the column number or any sort of visual reference to what I'm referring to, I see it's use here to be vulgar. If this is the way Apple wants to do spreadsheets, I'll resort to another option. This really hurts my feelings as a customer, because I bought iWork 08 and now 09 with the hopes it would be a reasonable MS Office replacement. I really wish Claris Works still existed or that they'd based iwork of CW's code.
But then again, I dislike FileMaker enough that I'd rather learn MySQL.

Similar Messages

  • Sorting on a Formula field

    Everytime I try to do a sort on the formula field below, I can't sort on the field.  It doesn't even show the field in the explorer window to sort on.  The formula is below.
    Sum ({fct_CurrentSales.Cases}, {@upc}) /
        (tonumber(Maximum ({vw_dim_Product.CA_MPN_JMelBoxesPerPallet}, {@upc}))) / {Command.Previous Fiscal Month}

    Sorting is done at record level and you're using a sum in your formula as well as a maximum value.  Not sure about what is being done in the {@upc} formula but it may be affecting it as well.
    Look at your user guide and look up the multiple passes CR makes and what is done in each pass.
    (I used to keep a copy of the multiple pass flowchart on the wall above my computer as it contains good information on what can be done and when during the report generation.)
    Sum ({fct_CurrentSales.Cases}, {@upc}) /
    (tonumber(Maximum ({vw_dim_Product.CA_MPN_JMelBoxesPerPallet}, {@upc}))) / {Command.Previous Fiscal Month}

  • Sorting rows creates formula errors

    I have a simple Numbers 09 table to track money into and out of my Bank account and to show the balance. Data is entered as below:
    Column A is date of entry
    Row A1, A2 etc are the relevent dates of entry.
    Col B is Cash In, Col C is cash out and Col D shows the balance.
    For example D24 =D23+(B24-C24) i.e previous balance(cell D23) +cash in (B24)-cash out(C24) on date A24.
    This works fine if the entries are built up progressively as time passes.
    However, if with hindsight I need to change the date of an existing entry, when I re-sort column A by (using the arrow on the top of Col A to "Sort Ascending") the table re-sorts OK but the formula in Col D of the row that has moved is now incorrect. Instead of relating to the new "balance" cell in col D immediately above it in its new position, it clings on to the cell ref in D which it had before it was moved.
    I then have to copy the formula down from the D cell above it to get the correct cell ref into place and then copy that cell one down to ensure that all Col D values are correct.
    Excel didn't work like this.
    All cells in my formula are "Relative" and none are "Absolute"
    If anyone knows how to avoid this frustration I'd be truly grateful.

    Venetian Seeker wrote:
    Excel didn't work like this.
    VS,
    Yes, Excel works like this too, if you sort the entire table. You may not have recognized it, but it does. If you sort only one column, something you can do in Excel but not in Numbers, you may not get an error, but you have certainly done some serious mashing of your data.
    Whenever you sort, or otherwise move things around in a table, Numbers and Excel track the movements and adjust the formulas. This is normally what you would want.
    In the rare case when you want to reference a particular cell, regardless if that cell's content is relocated, you should use an addressing method that resists the effects of sorting and moving. That would normally involve the INDIRECT and ADDRESS functions. A running balance calculation is one of those rare cases.
    Using your example "D24 =D23+(B24-C24) i.e previous balance(cell D23) +cash in (B24)-cash out(C24) on date A24", we can instead write the following:
    D24 =INDIRECT(ADDRESS(ROW()-1, COLUMN())) +B-C
    You can use this same formula in your entire column D.
    Regards,
    Jerry

  • Help!!....I need some sort of a formula!!

    My application displays graphs from given data and I need to somehow get it to show between 8 and 12 tick marks on the x and y axis. They also have to be rational values i.e. 120.0 130.0 140.0, etc not like 120.25432 or 132.5363 or 143.94. The program can put the tick marks at regular intervals already but not rational values. I seem to need a tick mark everytime the integer part changes by 1, 2, 2.5, 5, 10, 20, 25 or 50. This sequence would repeat for hundreds: 100, 200, 250, 500, 1000, 2000, 2500, 5000 and so on for hundreds of thousands. I don't need ticks at 40, 60, 3500, etc unless these numbers fall naturally into the above sequence. This requirement also repeats for the fractional part as well: a tick every 0.1, 0.2, 0.25 or 0.5 units.
    I need to find a formula for "every XXX" depending on the level of the sequence.
    I would need between 8 and 12 ticks on a "normal" screen 800 x 600 pixels. E.g. if the graph runs horizontally between 0 and 841ms then the 1000-scale would be too rare. Same for 500, 250 and 200 scales. The 100 scale would be ok as this would display 8 ticks, but the 50, 25, 20, 10 scales, etc, would be too dense. I need a formula to automatically make the decision that the 100 scale would be the one to use.
    The program also knows how to adjust the "base number" of ticks on the axis so that the labels don't run into each other. Possibly assume that base number of regular ticks plus/minus 20% of that number. E.g. 8 to 12 ticks become 10 ticks +/- (20% of 10 == 2) == 10 +/- 2 ticks. If user reduces the window, the base number may become 5 or 4. In that case the scale will be 5 +/- 1 tick or 4 +/- 1 tick (20% of 4 == 0.8 approx 1).
    Your help would be really, really appreciated as this needs to be sorted in the next week or two and I'm really stuck with this one!!
    Thanks!!

    To determine which scale to use first find the span of your axis Sx = Xmax-Xmin. You need to find which increment, when multiplied by the number of ticks N you wish to display, will cover this span.
    The pattern of numbers that you specify (1,2,2.5...) is not a regular pattern and therefore cannot be elegantly implemented with a simple formula. You need to create a lookup array that contains these values, then create your series by scaling that array by powers of ten.
    Start at an arbitrary scale, say, dx = 1 and find out if N * dx > Sx. If so, reduce dx to the next lowest increment in your series and repeat until N * dx > Sx is no longer true.
    If N * dx < Sx you need to increase dx and repeat until you achieve N * dx > Sx. Your previous value of dx will be your "magic increment".
    Hope this helps. Good luck!

  • Sort messed up

    The new iTunes has messed up my sort order on composers. I routinely change the composer's names on the "get info" screen to lastname, firstname. But the newest version of iTunes is sorting many of the songs according to firstname lastname. When I check the "get info" screen, the names are just as I changed them, so I can't understand why the names are not being sorted that way. 
    Even worse, it happens for only some songs, so to look up something from any given composer, I have to check both his/her first name and last name.
    Note that if the change is by albums. That is, either all the songs on an album are sorted by firstname lastname rather than as I have entered them on the "get info" screen, or all of them are sorted by the name I have entered on the "get info" screen (lastname, firstname).
    Can someone help me get this glitch corrected?

    mrwhites wrote:
    I've found a better solution,
    set Arrange by as you want and then hold down option key before opening the menu again.
    This way you'll be able to sort indipendently.
    I'm still searching for the "Use as default" option in my View Options...
    I think we've covered that already.
    That is the way it does work, but sometimes it reverses the order, which there is no way to control. Instead of sorting A to Z, it decides it is going to sort Z to A.

  • I've developed the problem that when I click on something I get a dialog box with a mess of stuff such as: Back,re;oad page ,Open in dashboard ,print page, etc. It's quite annoying!

    I have a problem that when I click on something I get a dialog box with Back,Reload page, Open in Dashboard,View Source Save page as ETC. I don't get the normal or expected respose to a simple "click". Another problem. For some reason the back and forth arrows it the tool bar of Safari have shifted from the upper left hand cornor to the uuuer rihht hand cornor.

    Something is seriously wrong then.  Did you move it?  There are several Library folders.  One of them should be inside your HOME folder.
    If WZZZ suggestion does not work, re-install your OS by using Mac OS X 10.6.8 Update Combo.  When done, repair permissions and restart your computer.

  • Numbers Sort function. In Numbers 09 there was 'rearrange' which worked perfectly. New Numbers 13 has Sort by column but I can't get it to work. is there a bug?

    In Numbers 09 there was 'rearrange' which worked perfectly. New Numbers 13 has Sort by column but I can't get it to work. is there a bug?

    Numbers '09 has a Reorganize panel and the top section of that panel is for sorting. Numbers 3 also has the ability to sort and it works.  However, Numbers '09 and Numbers 3 sort differently.
    In Numbers '09, if you had a formula such as =Table 1::A1 and if a sort of Table 1 moved cell A1 to A20, the formula would change to =Table 1::A20. In Numbers 3, the formula would stay =Table1::A1.

  • How do I sort by the presence of a particular character.

    Post Author: GrahamP
    CA Forum: Crystal Reports
    Hi
    I have a field that has incorrect data as a result of users entering wrong info. All the fields contain a + character somewhere in the field, and I'm trying to find a way of sorting a reports that just lists the field records that contains the + character. Is there a that is an equivilant to 'contains' or 'includes' that I can use in a formula.
    Thanks
    Graham

    Post Author: SKodidine
    CA Forum: Crystal Reports
    Try with InStr.
    For example, create a formula such as:
    If instr({table.field},'+') > 0 then true else false;
    Sort (descending) using this formula to give you all the records where the field contains a '+'.

  • Power switch wiring: I messed up: color/circuit diagram help?

    I messed up as I was doing some work inside my 700 MHz eMac.
    Managed to break one of the three wires on the power switch. Having done that before, I decided it was time to replace all the wiring with something longer and more substantial. All OK until I realized how stupid I can be: I failed to note the color-to-pin on the the little square 4-pin plug at the motherboard end of the power switch wiring harness. The socket has four pins, like this: :: Can someone tell me which is Red/Green/Black, with orientation, e.g. looking at the socket as it is vertically above the Firewire/USB/Ethernet/sound output socket panel? (That would be, obviously, with the monitor face down)
    So some sort of diagram? such as:
    Blank . . Red
    Green . . Black
    Video out
    Ethernet
    etc.
    Many thanks.

    Hey G4,
    I've got a 700 logic assembly out here and actually you've got it right.
    If you look at that socket that the 2X2 plug plugs into the positions are (this would be in the true orientation of the plug where the bottom is the bottom of the computer):
    Blank . . Red
    Green . . Black
    I.E. the top right slot is red the top left is open.
    The two important ones are the red and the black. I've got tiny jumpers in the power button end of that cable. When I start the eMac out of the case I momentarily short those two leads together.
    Richard

  • Genre sort in Browser, auto sync, sort order

    I just updated to 3.1.1 and iTunes 9.0. Now Genre is missing in the browser. How can I get it back? Also none of my playlist sync in auto. I have to manually manage it. I rarely use it for music, just for listening to stories and podcasts, so it's important to have them in the correct order for listening, i.e. chapters. Now the playlist doesn't show up on the itouch sorted correctly.
    1. Doesn't have Genre in Browser. 2. Doesn't auto sync. 3. Sort order is messed up between iTunes and iTouch. 4. Is it caused by 3.1.1 or iTunes 9.0? Does anyone know how to fix these issues? I don't have an old download of iTunes 8 to uninstall 9 and reinstall 8. iTouch 3.1.1 can't be uninstalled. Shadow

    shadow1953 wrote:
    1. Doesn't have Genre in Browser.
    iTunes 9 changed the browser to a column on the left side (by default), but you can go back to how it was on top, see the View/Column Browser menu. You can have multiple filters (Artist, Album, Composer, etc.) either as a column on the left, or across the top.
    shadow1953 wrote:
    2. Doesn't auto sync.
    You have to be doing something wrong since auto-sync does work. Make sure your iPod is in auto-sync mode -- if you change the sync mode, make sure you click the "Apply" button -- if you don't, it won't change. If you're not syncing your entire library, then make sure that you've selected the playlists you want loaded onto the Touch.
    shadow1953 wrote:
    3. Sort order is messed up between iTunes and iTouch.
    Are you referring to the sort order within a playlist, or the sort order of all your playlist names? I know that the playlist name sorting has changed (again) such that punctuaion comes first, then letters, then numbers. If you're referring to the sort order of the items within a playlist, then it may be a bug -- there are reports of problems with the sorting of podcasts within playlists, so maybe the same is true for books?
    shadow1953 wrote:
    4. Is it caused by 3.1.1 or iTunes 9.0? Does anyone know how to fix these issues?
    Not sure, could be either.
    shadow1953 wrote:
    I don't have an old download of iTunes 8 to uninstall 9 and reinstall 8. iTouch 3.1.1 can't be uninstalled.
    You can get down-rev versions of iTunes at sites like filehippo (there are others). Keep in mind though that your "iTunes Library.itl" file was changed with iTunes 9 and is not backward-compatible. You'll have to look for the old .itl file in your "Previous iTunes Libraries" folder (check the date of these .itl files). If you fid the .itl file from iTunes 8, just replace the current one and then uninstall iTunes as well as "Apple Mobile Device Services" and Quicktime, then install iTunes 8.
    You can go back to a prior OS version on your Touch if you have the native file (you would if you previously did a firmware update, it stays on your computer). If you updated to 3.0 then you can go back to it by holding the SHIFT key as you click the Restore button (use the OPT key on a Mac) and then select the 3.0 version. You can't go back to 2.x in this manner, but there is a different way to go back to 2.x if you ever want to (won't go into that here).

  • How to dynamically sort cached CR instance accessed via opendocument

    I am currently accessing cached CR instances via an opendocument call (from XC dashboard) that filters the records on display using &sf in the opendocument call to display only the records that match the criteria selected by a user. These instances are refreshed weekly and accessed hundreds of times throughout each week.
    I have new requirements where the users want the records in the CR instance to be sorted differently depending upon what they have selected. I have been trying to do this with a formula based on the recordselection() and while this works fine if I am refreshing the report, it does not when I am filtering a cached instance because the recordselection() is not being evaluated at the proper time (I suspect). If I evaluate the recordselection() whileprintingrecords then I can get access to the selection filter value but I cannot group on the dependant formula - I get the error "Group specified on a non-recurring field".
    Does anyone have any ideas on how I can accomplish this goal without forcing a refresh on the report (which is not an option based on volume / performance needs)? I am happy to provide more detail if needed.
    Thanks in advance...

    Salah / Ashwin,
    Thank-you both for the suggestion.  I am using CR2008 so bind sort control is available for my usage however it does not solve my problem exactly. I really need to dynamically group and sort on the group...   Here is some more detail for you to consider.
    The CR I am accessing is grouped based on a customer ID.  Each customer ID can have many detail rows (which are suppressed on the report always).  Each detail row contains the band value for each trait which can be analyzed in the parent XC dashboard.  When the CR instance is accessed via the opendocument call from XC, there is a selection filter applied so that only the detail rows that meet the criteria of the selection in XC are included for consideration in what is displayed in CR.  What I have found is that the bind sort control can work within a group, but I need this to supercede the group sorting because otherwise I am just sorting the trait within customer and I could never get the list sorted in such a way that the customer with the largest or smallest value in a trait field is first because the grouping by customer ID always is the primary sort.
    What I wish I could do, was set the group field to be set dynamically based on the recordselection sent from the XC dashboard.  Then, if the request to filter the report came based on the sales trait, it would be grouped by sales number.  If the request came based on customer age, it would be grouped / sorted by customer age.  What I am finding here is that I cannot group by a formula that is evaluates the recordselection whileprintingrecords, yet I need the recordselection to be evaluated at that time in order to accurately pick up the selectionfilter passed in the opendocument call.  Any ideas on this?
    I am also toying with the idea of getting rid of the groups altogether and just displaying detail with identical rows suppressed.  this will be a bit of a comprimise for our users because I don't know how I can show the total number (a sum) of records in the detail section.  If I can get them to agree to that, I think that I can create a formula based on recordselection that I can bind sort control to -- Just tested and found out that I cannot sort on a formula that evaluates recordselection whileprinting records so this may be out the window too...
    Of course, all this would be relatively easy if I could just referesh the report on demand when accessed but that is not a viable option due to a number of reasons.  Any help / suggestions on this are greatly appreciated!!!
    Edited by: Steve Fowler on Nov 2, 2009 4:07 PM

  • COUNTIFS with 3 arguments?

    Hi,
    I've created a sheet to record various employee details, such as lieu, annual leave, sickness, leave of abscence etc over each month (please see link below):
    http://flic.kr/p/aBeviB
    This has been working really well for the last couple of years although I have one problem — co-managers aren't manually recording the rest of the information (cells without figures), beyond the red vertical dotted line. This is causing some confusion and errors. If possible, I'd like Numbers to count the correct coloured cells from columns 1-31 (on the sheet) and insert the SUM in the corresponding columns beyond the dotted line. (Hope this is making sense!)
    At the moment only the Annual Leave cells (full day and half day) contain a figure and therefore gets recorded automatically under 'Taken', on the right of the sheet.
    As appointments only sum up to 1, I've added the following formulas by adding text in the cells and matching the colours (so text is hidden):
    =COUNTIF(C6:AG6,"Doctor")
    =COUNTIF(C6:AG6,"Dentist")
    =COUNTIF(C6:AG6,"Hospital")
    This works fine. I can then repeat this in the rows below for each employee.
    Can I do this with the full and half day cells? I've tried =COUNTIF(C6:AG6,"Sickness Full Day", "Sickness Half Day"), but obviously it won't accept more than 2 arguments.
    Any help much appreciated!

    Barry wrote:
    Mofowax wrote:
    ...This has been working really well for the last couple of years although I have one problem — co-managers aren't manually recording the rest of the information (cells without figures), beyond the red vertical dotted line. This is causing some confusion and errors. If possible, I'd like Numbers to count the correct coloured cells from columns 1-31 (on the sheet) and insert the SUM in the corresponding columns beyond the dotted line. (Hope this is making sense!)
    Can I do this with the full and half day cells? I've tried =COUNTIF(C6:AG6,"Sickness Full Day", "Sickness Half Day"), but obviously it won't accept more than 2 arguments.
    COUNTIFS, which your subject line indicates you're considering, counts only if ALL conditions evaluate as TRUE, making that function inappropriate for your sickness example.
    What you need is a formula containing two COUNTIF statements, one for each of the sickness cases, which are then added to give the total. Assuming that a half day's absence is counted as 0.5, you'll also need to multiply that count by 0.5 before adding it to the count of full day absences. For "Sickness...", your formula wil be:
    AN6: =COUNTIF(C6:AG6,"Sickness Full Day")+(0.5*COUNTIF(C6:AG6,"Sickness Half Day"))
    Regards,
    Barry
    Barry, that has worked perfectly! Thank you so much (including you Wayne) for your help. This has solved a long-running problem with this sheet and one solution I can adopt elsewhere.
    All the best!

  • Excluding Header Column from sort

    Hi,
    I am working with a simple league table for sports.
    I want to sort the league table descending by "Points" but I don't want the header column (which contains numbers 1 ... 32 for position) to be sorted.
    I want the header column to remain as set but the other part of the spreadsheet to sort.
    I can't seem to find a way to do this.
    Thanks,
    Matt

    Matt,
    You aren't allowed to sort some columns and not others because this breaks the relationships between fields in the sorted records. There are two ways to treat this that come quickly to mind, and there may be others.
    First, you could have your header column be actually in another Table located just to the left of your main table. That way it wouldn't be included in the sort.
    Another way would be to make your position count to be generated by a formula, such as =ROW(). If you have a Header Row with titles in it and your count begins on row 2, you could program =ROW()-1
    Regards,
    Jerry

  • Pass the results from a selection formula to the default values for a parameter field

    Post Author: kevans
    CA Forum: General
    Crystal 10 u2013 SQL 2000
    I want to create a parameter field that will display all of our IT Departments so the end user can select the one they want to run the report against, such as IT-Security, IT-Network, etc. about 40 in all.  BUT I donu2019t want this to be a static list where I type in all 40 depts in the default list, I was hoping I could do something more dynamic such a formula field that says u201C if {group.name startswith u2018ITu2019 then {group.name}u201D and then have the parameter field pull from this source.
    Iu2019m sure this has been answered in a previous post but Iu2019m not finding it.  I see stuff on creating a record selection formula such as u2018if {?group} like u2018IT-Secur*u2019 thenu2026u201D  but this leaves too much room for error if people donu2019t type the name correctly.  Maybe Iu2019m not using the record selection formula correctly?  Sorry if I offend anyone but I just upgraded from 8 to 10 and thought for sure this option would be in 10, perhaps built right into the parameter default value page where you can place in select criteria but NOTHING has changed.

    Post Author: sharonmtowler
    CA Forum: General
    if you are creating the parameters in the rpt file, it will only pull values you enter, or directly from the database
    in the record selection you can do something like this, so if they only enter the first 2 characters it should pick up only the IT etc.
    (if eft(,2)={?parameter} then true else ={?parameter})

  • Is there a way to Extract all formulas from Crystal Reports files?

    Hi:
    I have about 40 Crystal Reports (.rpt files).  I need to go through each one and look at formulas if a certain variable/value is used since it has currently changed.  It is taking way too long and not to mention inefficent to open each file, look through any place where there could be custom formulas such as when to suppress - etc.  Is there are way to easily exact all custom formulas from all those report into say a Text file so I can do a Search for it?  That would be the easiest way to find what I'm looking for.
    I have Crystal Reports XI.
    Thanks in advance for your help.

    One option is to use a tool such as rptInspector.  See: [http://www.softwareforces.com/Product/ri/pro/3/rptInspector.htm|http://www.softwareforces.com/Product/ri/pro/3/rptInspector.htm]

Maybe you are looking for

  • Graphics render bug in FCP 6 and 7 - Dare to prove me wrong?

    I have an issue with an HD video that contains red and purple text and graphics in the edit. I've looked for an answer tirelessly online, with friends, and through trial and error for a good 7 hours before giving up. Here's the deal, Sequence setting

  • How do I get custom hardware approval for iPad-app?

    Hi! The company I´m working at is in pre-production on an app project for which we would like to manufacture an optional hardware controller. We have read all the app store review guidelines, and we can´t see any reason as to why the project shouldn'

  • Using a 4:3 17" LCD with a 1st gen intel MacBook

    I have 2 MacBook's that we use in the office for our sales team. They like to have them hooked up to the 17" LCDs with external mice and keyboards. The problem is that when I mirror the display it shows up on the monitor as a 16:9 display... giving m

  • Itunes opens with terms of agreement then closes in a flash

    i click on iTunes and it comes up with the term of agreement and the i agree button but i dont get the chance to click any then it disappears. does anyone have any help for me please and thnx hp. pavilion f1703   Windows XP  

  • Order type , Itemcategorys and Delivery type and delivery item categories a

    Hi SAP Kings I want all the standard documents types like Order type , Itemcategorys and Delivery type and delivery item categories and Billing types for the following Senioures in SAP . plz help me and full points will be awarded . ·     Sales From