Ask Your Question
0

Removing STYLE() breaks the formula [closed]

asked 2019-04-08 16:18:04 +0200

paparucino gravatar image

updated 2019-04-08 16:29:45 +0200

Hi all, some times ago I received a precious help from this community regarding the use of STYLE(). Well, now Im facing some problems when sheets is read on dropbox or with other suites so I decided to remove the STYLE() option. This works for me like a violin :)

=IF(C30="","",IF(COUNTIF(C6:C26,"MW|SA|PA|MA|PB|MB")=C30,"0"&T(STYLE("Good")),COUNTIF(C6:C26,"MW|SA|PA|MA|PB|MB")-C30&T(STYLE("Bad"))))

Then I modified it this way

=IF(C30="","",IF(COUNTIF(C6:C24,"MW|SA|PA|MA|PB|MB")=C30,"",COUNTIF(C6:C24,"MW|SA|PA|MA|PB|MB")-C30))

Now the cell shows the value in C30, (the one marked italic). I mean, if I change the reference (eg C29) in the first COUNTIF still see the value of C30 in the second COUNTIF. Which brings to my problem: I always see the value of the second C30.

Any suggestion? Thank you in advance

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by erAck
close date 2019-04-09 20:22:51.624264

Comments

You mean the result is the negated value of C30 if the COUNTIF() result is 0.

erAck gravatar imageerAck ( 2019-04-08 16:48:14 +0200 )edit

If the result is zero I see a correct blank cell, otherwise I always see the value of C30. It seems the formula doesnt take care of the first part of the formula

paparucino gravatar imagepaparucino ( 2019-04-08 16:52:06 +0200 )edit

That doesn't make sense as the result basically is COUNTIF()-C30

Maybe you formatted it to not display the minus sign.

erAck gravatar imageerAck ( 2019-04-08 16:57:44 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2019-04-08 16:49:30 +0200

erAck gravatar image

As your COUNTIF() uses regular expressions in the Criteria make sure that regular expressions are enabled under Tools -> Options -> Calc -> Calculate.

edit flag offensive delete link more

Comments

And as you mention "problems when sheets is read on dropbox or with other suites" that probably won't work at all because other suites don't support regular expressions.

erAck gravatar imageerAck ( 2019-04-08 16:54:25 +0200 )edit

Oh my..!!! My brain stopped to work. You are right. Sorry The "problem" is the cause of this (no comment) thread. Should I start another question or we can gon on here? Eventually how can I mark this as solved?

paparucino gravatar imagepaparucino ( 2019-04-08 17:02:43 +0200 )edit

Please, if the answer solves the question click ✔.

m.a.riosv gravatar imagem.a.riosv ( 2019-04-08 19:42:41 +0200 )edit

Question Tools

1 follower

Stats

Asked: 2019-04-08 16:18:04 +0200

Seen: 18 times

Last updated: Apr 08