3

I was following the tutorial on this page to do some conditional formatting, but I'm getting an error when using this formula

=AND ($B3>=45, $B3<=54)

Error message:

enter image description here

It says there is a problem with the formula, and it explains if it starts with an = or - sign it means it's a formula... The information on the error doesn't say anything helpful. Not used to work on excel so sorry if this is stupid. Can you help me? Thanks

7
  • Include error you are getting. Commented Feb 16, 2018 at 9:39
  • Does $B3 have actual numerical data in it? Please post a reproducible question. Commented Feb 16, 2018 at 9:39
  • @Petermonteer is the value in column B numeric? Commented Feb 16, 2018 at 9:54
  • Enter =AND(TRUE, TRUE) into any cell. Do you still get an error? Commented Feb 16, 2018 at 9:54
  • 1
    @Petermonteer, I would always recommend trying the formula on the worksheet before using it in conditional formatting. Check that it returns TRUE where you expect it to? Commented Feb 16, 2018 at 10:18

2 Answers 2

5

Firstly, try changing your comma , to a semicolon ;.

=AND($B3>=45; $B3<=54)

As pointed out by IQV, you will also need to use the Portugese version of AND() which is E():

=E($B3>=45; $B3<=54)

Here is a source for translating English functions to Portugese functions:
http://dolf.trieschnigg.nl/excel/index.php?langids=en+po

Your regional settings determine whether you need to use a comma or semicolon as a separator. So, when you find formulas with commas in future you'll need to make the same changes again.

You could also change your list separator in your control panel. Go to Clock, Language and Region > Region and Language > Additional settings > List separator and change it from ; to ,.

For more details, see here:
http://datapigtechnologies.com/blog/index.php/why-your-version-of-excel-only-accept-semicolons-in-formulas-instead-of-commas/.

Sign up to request clarification or add additional context in comments.

5 Comments

I was not aware that regional settings influenced Excel syntax. Most programming languages do not have this +1.
But it's strange, that the localized function name should not work. It would be interesting, if localized function name E() and ; would work too. In german Excel one can use UND() in conditional formatting.
@IQV, I thought that was much more likely to be the problem as well. Perhaps Excel allows local language and English?
@CallumDA I tried it out. In german version it doesn't work. Only german function names work. It's surprising and strange...
You were right! When changing to ; it accepted the formula but it didn't work, I had to change to E() so it works! Thanks!
2

Obviously you use a localized excel. So in conditional formatting you have to use the localized function names. When using E() instead of AND() it should work.

And as CallumDA mentioned in the comments you should prove which list separator you have to use in your formulas: ; or ,.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.