TRIMEND


Removes instances of space character from the end of a string.

Syntax:

TRIMEND(text)


Example:

If text contains "Hello     ":

TRIMEND("Hello     ")

returns "Hello"


Text:


Result:

Hello

Application:

Imagine you are a data analyst for a company that runs an e-commerce website. You've noticed that customer input from a web form is often inconsistent. Specifically, the "Product Code" field sometimes has extra spaces at the end, which is causing problems when you try to join this data with the company's master product list. The extra spaces prevent the codes from matching correctly.

Order ID

Customer Name

Product Code

Product Code after using TRIMEND

A
B
C
D
1
101
Alice
P-501
P-501
2
102
Bob
P-322
P-322
3
103
Charlie
P-502
P-502
4
104
David
P-323
P-323
5
105
Eve
P-503
P-503

For D1: "P-501 " becomes "P-501" when using TRIMEND(C1)

For D2: "P-322 " becomes "P-322" when using TRIMEND(C2)

For D3: "P-502 " becomes "P-502" when using TRIMEND(C3)

For D4: "P-323 " becomes "P-323" when using TRIMEND(C4)

For D5: "P-503 " becomes "P-503" when using TRIMEND(C5)





This page is protected by Google reCAPTCHA. Privacy - Terms.
 
Built using Zapof