google sheet : My conditional formula is suddenly not working [duplicate] - google-sheets

This question already has an answer here:
I get Formula parse error with all formulas
(1 answer)
Closed 4 months ago.
I've been using this formula a lot and it always works on my other files. But this time i'm confused, i always got error. I'm just using new empty sheet, there's no data at all. Does anyone can spot the problem ? Pls see my screenshot.
=countif(A1:A,A1)>1
It works on my other files, but i have no clue why it doesn't work on this file. I tried new sheet, but no luck. I close and reopen file, but still the same.
Note : when i use in another new file, it works fine.
Thanks

either change locale of your spreadsheet to English-based or use semicolon as argument separator instead of comma:
=COUNTIF(A1:A; A1)>1

Related

Split Function with Index Match function

I have a column that has multiple comma separated values, I need to use Split function and then run index match on that column, is it possible ? if yes somebody can help pls
Yes, you can do this, I just tested it in google sheets.
=INDEX(<array>,MATCH(SPLIT(<cell>,","),<array>,0))
To be honest, I was googling for something similar and ran across this issue. My problem turned out to be that I was using ',' and NOT ",". I suspect you asked this question for similar reasons (you tried it and it didn't work). So just to confirm, it is totally possible, the issue is likely an error with your formula.
output of a minimal example, using the above formula, matching on the first split:

How to remove the integer behind the name if there is any? (google sheet)

Hi everyone,
My goal is to remove the integer behind the name (if exist) as shown in the screenshot above. Is there any trick to do this other than doing it manually? It is challenging for me because the name list is not consistent as some of the names does not have integer behind. Any help will be greatly appreciated!
In your situation, how about the following sample formula?
Sample formula:
=ARRAYFORMULA(REGEXREPLACE(A3:A,"\d+$",""))
Result:
Note:
If you want to use TRIM for the value, how about =ARRAYFORMULA(TRIM(REGEXREPLACE(A3:A,"\d+$","")))?
Reference:
REGEXREPLACE
Added:
From OP's following replying,
Hi Tanaike, thanks for your input. I tested both formula. It works most of the time with the exception of Derrick Tan 1. Beside that, is it possible to remove the - as well if exist? I edited my question with new screenshot example, thank you.
In this case, how about the following sample formula?
Sample formula:
=ARRAYFORMULA(TRIM(REGEXREPLACE(A3:A,"[-\s\d]+$","")))
Result:

=LEN Function in Google Sheet not working corretly

I have a column with lots of rows containing text. I want to highlight cells with over an x-amount of characters, but how? The code I'm using in combination with 'Conditional Formatting' is not working all the time. Sometimes it highlights text over the x amount and sometimes it doesn't, so there is something I'm doing wrong here. The x-amount in the example below is: 300.
you may also need to lock it like:
=LEN(E$1:E$170)>300
Silly me... I found the answer myself. I need to put in the same range in the formula as well. Formula with the range E1:E170 needs to be: =LEN(E1:E170)>300

SUMIFS corrupting spreadsheets with PHPSpreadsheet

I am using PHPSpreadsheet and am reading in a spreadsheet with the following (working correctly) formula. I'm using Libre Office to generate my spreadsheet.
=SUMIFS($My_sheet.C:C,$My_sheet.B:B,">"&$'Home page'.$I$12,$My_sheet.B:B,"<"&$'Home page'.$I$13)
For some reason when I remove the offending rows my sheet reads/writes perfectly fine but with them I get corrupted files and it throws unreadable files.
I'm not setting the value - this is already in the spreadsheet I'm reading.
I hope this will help someone. I was looking for PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional::SUMIFS() as your call.
For the example given simply wrap each , separated section in quotes and pass them to this function. So the answer would be:
use PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional as StatCond;
StatCond::SUMIFS('$My_sheet.C:C','$My_sheet.B:B','">"&$\'Home page\'.$I$12','My_sheet.B:B','"<"&$\'Home page\'.$I$13')

Countif function not counting word with an apostrophe

I’ve looked through the forum, but haven’t found a solution. I’ve got some survey responses in a table like so:
It’s okay
I don't like school
It’s okay
Good, I like it
I’m using a countif function to count the number of times each response was received in the survey. The thing is my function works well with these values:
I don’t like school
Good, I like it
but my function does not pick up the phrase
It’s okay
As I’m using named ranges, the formula I am using is:
=COUNTIF(Question,"It's okay")
Please see this shared link for the example file and check out sheet 2 for the actual formula.
https://drive.google.com/open?id=1e1ccJh3TDeOsIrcn0f5ewQ3M6xOuBrfKBqqJ3mzXfV0
Initially, I thought the issue was that the countif function wasn’t working because of the apostrophe in the word “it’s okay”. As you can see from my example, there are other words with apostrophes in them that get counted so I’m baffled as to why this function is not working for the phrase “it’s okay”.
Has anyone seen this problem before, or any ideas as to how I could accomplish the same thing using another process?
I’ve also tried to escape the apostrophe like so :
=COUNTIF(Question,"It''s okay")
=COUNTIF(Question,"It\'s okay")
But neither case made any difference.
Many thanks in advance
That's because you have different apostrophes in data and in formula:
’ ("Right single quotation mark", ASCII code 146) in data
' ("Single quote", ASCII code 39) in formula

Resources