Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default LEFT(D2,3) but no spaces

Hi,

I am using the formula below in (E2)

=LOWER(LEFT(D2,3)&TRIM(CLEAN(SUBSTITUTE(F2," ",""))))&RIGHT(D2,2)

The problem I am having is... If one of the first 3 characters in D2
is a space, I don't want it. I need the formula to just ignore a
space if it is there. It can either drop the space and get the first
2 characters, or ignore the space and pick up the first 3 characters
that are not spaces.

Please, does anyone have a solution?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default LEFT(D2,3) but no spaces

Just incorporate another Substitute formula:
=LOWER(SUBSTITUTE(LEFT(D2,3)," ","")&TRIM(CLEAN(SUBSTITUTE(F2,"
",""))))&RIGHT(D2,2)

yovation wrote:
Hi,

I am using the formula below in (E2)

=LOWER(LEFT(D2,3)&TRIM(CLEAN(SUBSTITUTE(F2," ",""))))&RIGHT(D2,2)

The problem I am having is... If one of the first 3 characters in D2
is a space, I don't want it. I need the formula to just ignore a
space if it is there. It can either drop the space and get the first
2 characters, or ignore the space and pick up the first 3 characters
that are not spaces.

Please, does anyone have a solution?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default LEFT(D2,3) but no spaces

Put an example of the text you have on D2 and what you have on F2 and what
you would like to see as a result, not what you are currently getting. This
way I may be able to give you an accurate answer.
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"yovation" wrote:

Hi,

I am using the formula below in (E2)

=LOWER(LEFT(D2,3)&TRIM(CLEAN(SUBSTITUTE(F2," ",""))))&RIGHT(D2,2)

The problem I am having is... If one of the first 3 characters in D2
is a space, I don't want it. I need the formula to just ignore a
space if it is there. It can either drop the space and get the first
2 characters, or ignore the space and pick up the first 3 characters
that are not spaces.

Please, does anyone have a solution?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default LEFT(D2,3) but no spaces

Thank you for your replies.

JW, that is exactly what I was trying to do. It worked perfectly.


On Sep 26, 10:26 am, JW wrote:
Just incorporate another Substitute formula:
=LOWER(SUBSTITUTE(LEFT(D2,3)," ","")&TRIM(CLEAN(SUBSTITUTE(F2,"
",""))))&RIGHT(D2,2)

yovation wrote:
Hi,


I am using the formula below in (E2)


=LOWER(LEFT(D2,3)&TRIM(CLEAN(SUBSTITUTE(F2," ",""))))&RIGHT(D2,2)


The problem I am having is... If one of the first 3 characters in D2
is a space, I don't want it. I need the formula to just ignore a
space if it is there. It can either drop the space and get the first
2 characters, or ignore the space and pick up the first 3 characters
that are not spaces.


Please, does anyone have a solution?



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
How do I remove leading spaces the column is left justified mar Excel Discussion (Misc queries) 3 August 31st 09 09:20 PM
when inserting new worksheets they read right to left not left to. Andy Setting up and Configuration of Excel 2 December 3rd 08 09:51 PM
How to make a cell appear in upper left (top left) corner of works jeff Excel Programming 2 March 6th 07 10:14 PM
how do I remove leading spaces and leave the remianing spaces w Debi Excel Worksheet Functions 6 February 28th 07 03:29 PM
How to change the right-to-left worksheet to left-to-right workshe RAMA Excel Discussion (Misc queries) 1 July 4th 05 01:57 PM


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

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"