admin管理员组

文章数量:1279008

I am trying convert cell values to upper using a formula. I have a google sheet with this format:

ID Name
1 usa
2 Canada

I am trying convert cell values to upper using a formula. I have a google sheet with this format:

ID Name
1 usa
2 Canada

To make this, in the next cell I am putting this:

=CONCATENATE("case "; B2; " = "; UPPER(TRIM(A2)); ";")

My expected result is this: case USA = 1;

But I am getting always case usa = 1;

Why are this ignoring my UPPER function?

Share Improve this question asked Feb 23 at 21:15 GenautGenaut 1,8622 gold badges30 silver badges63 bronze badges 0
Add a comment  | 

2 Answers 2

Reset to default 3

Apply upper() to B2 instead of A2, like this:

="case " & upper(B2) & " = " & A2 & ";"

Try this Alternative solution

Inline with @doubleunary explanation, The issue in your current formula UPPER(TRIM(A2))is applying to ID Column (A), and the Upper case that you want to have is Column B (Name), If you want to continue your formula try this format

=CONCATENATE("case ", UPPER(TRIM(B2)), " = ", A2, ";")
ID Name
1 usa case USA = 1;
2 Canada case CANADA = 2;

本文标签: google sheetsCan39t convert cell values to uppercase using UPPER functionStack Overflow