Re: [libreoffice-users] LO Calc - style in formulae

2016-04-14 Thread Remy Gauthier
Le jeudi 14 avril 2016 à 12:18 -0400, Henry Sikkema a écrit :
> I am wondering if it is possible in LO Calc to incorporate styles
> into
> formula:
> 
> =if(*A1 is bold*, do this if true, do this if false)
> 
> *Henry*
> 
Hello,
I do not think you can get the formatting information about a cell.
However, if the cell you want to look at has been set to a style which
identifies its formatting via a formula, you can use the FORMULA()
function to extract that information. For instance:
Cell A1 contains 25
Cell A2 contains =A1*1.8+32+STYLE("STYLE_BOLD")
You can create a formula like:
=IF(NOT(ISERROR(FIND("STYLE_BOLD";FORMULA(A2;"Bold";"Not bold")
to find out if the cell has been formatted as bold or not. Of course,
you will need to create and assign the styles to the various cells, but
you should be able achieve something with this method.
I hope this helps.
Rémy Gauthier.

-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


Re: [libreoffice-users] LO Calc - style in formulae

2016-04-14 Thread toki
On 14/04/2016 16:18, Henry Sikkema wrote:

> I am wondering if it is possible in LO Calc to incorporate styles into 
> formula:

In theory, it can be done.
In practice, forget it.
It requires creating a number of additional (^1) rows and columns, and
an exponential increase in places where errors are made. Not can be
made, but will be made, because edge cases were ignored. Almost
everything is, at least initially, an edge case.

^1: IIRC, it was on the order of 10,000 additional cells, for each cell
in which the comparison was made.

jonathon


-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


Re: [libreoffice-users] LO Calc - style in formulae

2016-04-14 Thread Brian Barker

At 12:18 14/04/2016 -0400, Henry Sikkema wrote:
I am wondering if it is possible in LO Calc to incorporate styles 
into formula:

=if(*A1 is bold*, do this if true, do this if false)


If by "style" you mean local formatting - which is what "bold" is - 
then I think the answer has to be "no", since any cell could have a 
mixture of bold and not bold contents.


What could in principle be retrieved would be the cell style of a 
cell. If that facility had been provided, I imagine it would have 
been as part of the CELL() function - something like

=CELL("STYLE";Xn)
- but that's not available.

I trust this helps.

Brian Barker


--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



[libreoffice-users] LO Calc - style in formulae

2016-04-14 Thread Henry Sikkema
I am wondering if it is possible in LO Calc to incorporate styles into
formula:

=if(*A1 is bold*, do this if true, do this if false)

*Henry*

-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted