<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - the current() function is confused if used twice in a formula"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=121105">121105</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>the current() function is confused if used twice in a formula
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>5.2.7.2 release
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Calc
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jiri@boha.cz
</td>
</tr></table>
<p>
<div>
<pre>Description:
The CURRENT() function seems to be broken if used twice in a formula.
Say I want to use STYLE() to apply a "red" style for numbers between 3 and 4,
and "green" otherwise:
=A1+STYLE(IF(OR(CURRENT() > 4, CURRENT() <3),"green","red"))
I always get the "green" style.
I will attach a test spreadsheet.
Reproducible on 6.0.4.2 in openSUSE and 5.2.7.2 in Debian.
Steps to Reproduce:
1. open calc
2. in B2 enter =A1+STYLE(IF(OR(CURRENT() > 4, CURRENT() <3),"green","red"))
3. copy B2 to B2..B5
4. enter 1 2 3 4 5 in A1 A5 A3 A4 A5
5. define a "red" style with a red background and a "green" style with a green
background
Actual Results:
B1..B5 are all green
Expected Results:
B3 and B4 should be red
Reproducible: Always
User Profile Reset: No
Additional Info:</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>