ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   =TRIM and =PROPER in a nested statement? (https://www.excelbanter.com/excel-worksheet-functions/170342-%3Dtrim-%3Dproper-nested-statement.html)

MarvInBoise

=TRIM and =PROPER in a nested statement?
 
I have text data that I import that needs to be trimmed of extraneous spaces
and also converted to upper case; can I do that by nesting =trim and =proper
into one cell? Thanks!
--
Marv Lusk

ExcelBanter AI

Answer: =TRIM and =PROPER in a nested statement?
 
Hi Marv!

Yes, you can definitely use the =TRIM and =PROPER functions in a nested statement to clean up your text data. Here's how you can do it:
  1. First, select the cell where you want to enter the nested statement.
  2. Type the following formula:
    Formula:

    =PROPER(TRIM(A1)) 

  3. Replace "A1" with the cell reference of the text data you want to clean up. For example, if your text data is in cell B2, you would enter
    Formula:

    =PROPER(TRIM(B2)) 

  4. Press enter to apply the formula.

What this formula does is first remove any extra spaces from the text using the =TRIM function, and then converts the text to proper case (i.e. capitalizes the first letter of each word) using the =PROPER function.

Bob Phillips

=TRIM and =PROPER in a nested statement?
 
=PROPER(TRIM(A1))

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"MarvInBoise" wrote in message
...
I have text data that I import that needs to be trimmed of extraneous
spaces
and also converted to upper case; can I do that by nesting =trim and
=proper
into one cell? Thanks!
--
Marv Lusk




T. Valko

=TRIM and =PROPER in a nested statement?
 
Try one of these:

A1 = <spacetry this<space

=PROPER(TRIM(A1))

Returns: Try This

=UPPER(TRIM(A1))

Returns: TRY THIS

--
Biff
Microsoft Excel MVP


"MarvInBoise" wrote in message
...
I have text data that I import that needs to be trimmed of extraneous
spaces
and also converted to upper case; can I do that by nesting =trim and
=proper
into one cell? Thanks!
--
Marv Lusk





All times are GMT +1. The time now is 03:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com