Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 39
Default =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
  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up 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.
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default =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



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default =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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested IF statement PattiP Excel Worksheet Functions 4 January 23rd 07 10:56 PM
Nested if statement burl_h Excel Worksheet Functions 3 December 16th 06 06:35 PM
Nested IF Statement aposatsk Excel Discussion (Misc queries) 1 August 1st 06 05:19 PM
Nested if then else statement tzip123 Excel Worksheet Functions 8 February 24th 06 05:38 PM
NESTED IF STATEMENT jmsbert Excel Worksheet Functions 10 October 10th 05 04:25 PM


All times are GMT +1. The time now is 10:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"