Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
LEFT(D2,3) but no spaces
Does this help?
=LEFT(TRIM(f2),3) -- Don Guillett Microsoft MVP Excel SalesAid Software "yovation" wrote in message ups.com... 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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I remove leading spaces the column is left justified | Excel Discussion (Misc queries) | |||
when inserting new worksheets they read right to left not left to. | Setting up and Configuration of Excel | |||
How to make a cell appear in upper left (top left) corner of works | Excel Programming | |||
how do I remove leading spaces and leave the remianing spaces w | Excel Worksheet Functions | |||
How to change the right-to-left worksheet to left-to-right workshe | Excel Discussion (Misc queries) |