Am 06.06.2011 15:12, Michael D. Setzer II wrote:
I've tried another method that seems to give the results.
Unfortunately, it appears the current() doesn't give the results of
what is before the style when used in a formula?
Difficult to tell without concrete formula.
=(A1)+STYLE(CHOOSE(MIN(INT(((A1)-((A1)
1000))/1000)+1,6),"Red_bold","red","blue_bold","blue","orange","default"))
I used a single cell for the formula, but the (A1) could be replaced
with the formula (SUM((N151+L152)-(P152+R152))) or
(N151+L152-P152-R152) to give the same results.
Would have been simpler if all the options where< multiples of
1000 or all<=. I also added max and min, so a negative or higher
value would fall into the ranges.
I created styles with the matching names giving the styles.
Looking up the style name has 2 advantages: You can easily modify the
style names in the stylist and in the lookup table and you can modify
the threshold values in one place for all calculations including
conditional formattings. Quite often such a lookup table includes more
than 2 columns. Finding all occurrences of a particular format conditon
can be difficult.
--
Unsubscribe instructions: E-mail to [email protected]
In case of problems unsubscribing, write to [email protected]
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/www/users/
All messages sent to this list will be publicly archived and cannot be deleted