Created attachment 103816 [details] Countif/Countifs Deleted Data Example Windows 7 Home Premium SP1 Deleting a row in a named range which is used by CountIf/CountIfs does not update the function's result (the results are updated when new data is added). Forcing a recalculation using F9 does not update the result, however, saving and re-opening the file does update the result. The attached example contains, in sheet 1, a list of vegetables and seasons. Sheet 2 contains a list and a count of the vegetables. Sheet 3 a list of the vegetables and seasons with a count. In sheet1 there are three entries for cabbage and two for cabbage in the spring. Sheet2 (CountIf) calculates there are three entries for cabbage. Sheet 3 (CountIfs) calculates there are two entries for cabbage in the spring. Delete in sheet 1 an entry for cabbage in the spring and sheets 2 and 3 do not update the corresponding results.
This bug is unique. Only reproduced with spesific steps. To reproduce issue, we MUST do EXACT steps below: 1. Open attached file in comment 0 2. Click 'Sheet2' 3. Click 'Sheet3' 4. Click 'Sheet1' 5. Right-click row 2 > Delete Selected Rows Expected result: - Cell B3 in 'Sheet2' should be 2 - Cell C4 in 'Sheet3' should be 1 *) If we don't do step 3, then cell C4 in 'Sheet3' displays expected result. **) If we don't do step 2-3, all result displays as expected Not reproduced with LO 4.3.0.0.beta1, 4.2.4.2 Reproduced with LO 4.3.0.1, 4.2.6.1, 4.2.7.0.0+ Time: 2014-07-30_13:16:10 Hard recalc (ctrl-shift-f9) will generates correct results Tested on Ubuntu 12.04 x86
Found different behavior across LO versions if reproduce from scratch. I'll report later
(In reply to comment #2) Simple steps to reproduce from scratch: 1. Create new spreadsheet 2. Type: APPLE in each cell A1 and A2 3. Select A1:A2 > Insert > Names > Define 4. Type: FRUIT in 'Name' > Add 5. Create new sheet: 'Sheet2' 6. Type: APPLE in cell A1 7. Type: =COUNTIF(FRUIT;A1) in cell B1 8. Right-click row 2 in 'Sheet1' > Delete Selected Rows Not reproduced with: LO 4.1.6.2 Reproduced with: LO 4.2.0.0.beta1, 4.2.4.2, 4.2.7.0.0+ Time: 2014-07-30_13:16:10 *) Bug doesn't occured if we delete row 1 in step 8
ba096f438393091574da98fe7b8e6b05182a8971 is the first bad commit commit ba096f438393091574da98fe7b8e6b05182a8971 Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com> Date: Thu Oct 17 20:00:21 2013 +0000 source-hash-8499e78ca03c792f4fa2650e02b519094ba0baa8 commit 8499e78ca03c792f4fa2650e02b519094ba0baa8 Author: Caolán McNamara <caolanm@redhat.com> AuthorDate: Thu Jul 25 16:01:13 2013 +0100 Commit: Caolán McNamara <caolanm@redhat.com> CommitDate: Thu Jul 25 16:08:01 2013 +0100 Related: fdo#61544 convert language page from box to grid grid compress better than boxes if there isn't enough available space Change-Id: I35b433b89a29159a33fc9edb646e46b371747a57 :100644 100644 28f5d06d73a1be6ffa14981fa5c85369334b42f3 69df816431adccb1d94d7239031fa72b51b69fd9 M ccache.log :100644 100644 e90dd416081e52bf1f529e5cc252b740762fb67f fb3eed5f2df90e38291b7693863d22a51ae5f909 M commitmsg :100644 100644 f3412ea896c81e0e5e7c7c5b20da51801f5732d1 b37aff13469762597fe8e71b9eec6543077c6320 M dev-install.log :100644 100644 20c900e22a8115c31e67f895acbe3ec11c432314 a6d96513f1e560f38ad6b20e13ae9c5ddb619132 M make.log :040000 040000 956ae0b2d085e2de7f912e234fe22cb51b2e3f29 14c94892e549a813ae539489d88273f18ad79631 M opt git bisect log # bad: [423a84c4f7068853974887d98442bc2a2d0cc91b] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e # good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932 git bisect start 'latest' 'oldest' # good: [e02439a3d6297a1f5334fa558ddec5ef4212c574] source-hash-6b8393474974d2af7a2cb3c47b3d5c081b550bdb git bisect good e02439a3d6297a1f5334fa558ddec5ef4212c574 # bad: [4850941efe43ae800be5c76e1102ab80ac2c085d] source-hash-980a6e552502f02f12c15bfb1c9f8e6269499f4b git bisect bad 4850941efe43ae800be5c76e1102ab80ac2c085d # skip: [a043626b542eb8314218d7439534dce2fc325304] source-hash-9379a922c07df3cdb7d567cc88dfaaa39ead3681 git bisect skip a043626b542eb8314218d7439534dce2fc325304 # skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6 # skip: [aba65c3e4c0df07e4909aeefb758cdb688242bf6] source-hash-827524abfb4b577d08276fde40929a9adfb7ff1a git bisect skip aba65c3e4c0df07e4909aeefb758cdb688242bf6 # bad: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930 git bisect bad c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31 # bad: [c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31] source-hash-c69ed33628ec0b7abf6296539cf280d6c4265930 git bisect bad c81a8a0dcfc1ed095a80e4485c89dd0fcaf73f31 # bad: [1d4980621741d3050a5fe61b247c157d769988f2] source-hash-89d01a7d8028ddb765e02c116d202a2435894217 git bisect bad 1d4980621741d3050a5fe61b247c157d769988f2 # bad: [ba096f438393091574da98fe7b8e6b05182a8971] source-hash-8499e78ca03c792f4fa2650e02b519094ba0baa8 git bisect bad ba096f438393091574da98fe7b8e6b05182a8971 # good: [9daa289e178460daaafa4b3911031df5b8736218] source-hash-704292996a3731a61339b1a4a5c90c9403aa095f git bisect good 9daa289e178460daaafa4b3911031df5b8736218 # good: [34eab3946c46bb7273ba4ca395db9c4421dd232f] source-hash-e962805b31074d6b6a2ed0db6452769448337553 git bisect good 34eab3946c46bb7273ba4ca395db9c4421dd232f # good: [a8577b9049e085140768f97f7d4ff555a8a447cb] source-hash-98ded3e42011b060368899018c07cbd32e7993f1 git bisect good a8577b9049e085140768f97f7d4ff555a8a447cb # good: [da4ad98ef394c644bb0aa80161ff599330862e7c] source-hash-570fe620e9d573cfc9fc260e6518563c6a6c1a3c git bisect good da4ad98ef394c644bb0aa80161ff599330862e7c # good: [2d9baecf3ce2ea1ec8bea3e842eed595061eeef6] source-hash-ff51a2b64571a8d72ff4d8a8181d17cf98c42e69 git bisect good 2d9baecf3ce2ea1ec8bea3e842eed595061eeef6 # first bad commit: [ba096f438393091574da98fe7b8e6b05182a8971] source-hash-8499e78ca03c792f4fa2650e02b519094ba0baa8
I couldn't reproduce using the original file for some reason, but based on the instructions in comment 3, this has already been fixed in the range e094ac0ff95f82a05810fc98945eb5229d19eadb..d89a2aaaeb7c4afdb70978e5cb54443119e3ee45, most likely by the below commit. This has also already been applied to 4.3 and 4.4 commit 281847613bd3ae472523822f4be9c21cc353867e Author: Kohei Yoshida <kohei.yoshida@collabora.com> Date: Sat Oct 18 20:22:53 2014 -0400 fdo#82047: Correctly adjust references in range names on row deletion. Change-Id: Iac924b0b6932863f7f9cc088f996e0b07c340d2c
Migrating Whiteboard tags to Keywords: (bibisected) [NinjaEdit]