Issue 13672 - ROW() fails in conditional formatting
Summary: ROW() fails in conditional formatting
Status: CLOSED DUPLICATE of issue 34474
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 1.0.3
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: bettina.haberer
QA Contact: issues@sc
URL: http://cheap.net.au/~writer/row_bandi...
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-21 11:39 UTC by belzecue
Modified: 2005-02-15 11:25 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description belzecue 2003-04-21 11:39:00 UTC
A common Excel trick to produce row banding is to apply conditional formatting 
as follows: set condition 'formula is' to '=MOD(ROW(),2)=0' and formatting to 
any colour background.

This can be reproduced in OpenOffice Calc, however my tests revealed a bug.

First I created a cell style called 'shaded' which had a colour background.

I applied this conditional formatting to a column range of cells: 'formula 
is' 'MOD(ROW();2)', cell style = shaded.  This failed; the column range of 
cells *was not* banded as expected.  ROW() should be returning the row of the 
cell in which the formula resides -- as stated in the manual -- however, it 
appears not to be doing so.

On the other hand, if I apply the conditional formatting 'formula is' 'MOD(ROW
(A1);2)' to cell A1, and then I copy that cell to the range A2:A10, the column 
range is now banded as expected.  The problem appears to lie with not 
specifying a specific cell reference for the ROW function.

If I apply the cell values '=ROW()' to a column range of cells, this correctly 
reports the cells' row values, e.g. 1,2,3,4,5... so the row function is 
working correctly in that context.
Comment 1 frank 2003-04-23 11:53:12 UTC
Hi,

this is not a bug. It works as designed. But I set the flags for an
enhancement request.

Bettina,

1 4 u.

Frank
Comment 2 jminne 2004-05-07 17:29:41 UTC
When fixed, this will provide a work-around for bug 25213.
Comment 3 jminne 2004-05-11 19:56:46 UTC
When I try to use a formula such as 
=MOD(ROW(),2)=0 
cpu usage jumps to 95% and stays there.

version: 
win32 1.1.1b
Comment 4 belzecue 2004-12-21 19:37:40 UTC
I have just tested the banding function in Calc build 1.9.65.  To recap:

>> I applied this conditional formatting to a column range of cells: 'formula 
is' 'MOD(ROW();2)', cell style = shaded.  This failed;

When this conditional formatting value is applied to cells, it now works as
expected.  Cell banding (or any form of alternate-row formatting) now works just
like Excel.

For my part, this bug/enhancement is closed.  However jminne might wish to
follow up on his/her comments.
Comment 5 daniel.rentz 2005-02-15 11:24:36 UTC
fixed with issue 34474

*** This issue has been marked as a duplicate of 34474 ***
Comment 6 daniel.rentz 2005-02-15 11:25:24 UTC
double -> closed