close

Hi all,
I have a bunch of cells in a column with two letters. I want to put a dash
(-) inbetween these two letters. Does anyone know how I can do that?? Please
help!
(These are for initials, so, i want to add a dash in place of a middle
initial for those initials that were entered with only two characters.)
So, basically, I want to format the column so that when there are only 2
characters in a cell, a dash will be inserted in the middle. When there are
3 characters in the cell, they will be left alone.

thanks!
--
ELS

You can't do this with formatting, but you can use another column with formulas
like:

=if(len(a2)lt;gt;2,a2,left(a2,1)amp;quot;-quot;amp;right(a2,1))

ELS wrote:
gt;
gt; Hi all,
gt; I have a bunch of cells in a column with two letters. I want to put a dash
gt; (-) inbetween these two letters. Does anyone know how I can do that?? Please
gt; help!
gt; (These are for initials, so, i want to add a dash in place of a middle
gt; initial for those initials that were entered with only two characters.)
gt; So, basically, I want to format the column so that when there are only 2
gt; characters in a cell, a dash will be inserted in the middle. When there are
gt; 3 characters in the cell, they will be left alone.
gt;
gt; thanks!
gt; --
gt; ELS

--

Dave Peterson

Hi Dave!
You are awesome! Thank you! There's only one problem, when i drag that
formula down the column, the result for the cases that have 3 characters
shows up as a number. So, for example
Orignal column/formatted column
AB/A-B
ABC/380

Do you know of anything to add to the formula so that the result for cells
with 3 characters would be the same 3 characters?

Thanks!
--
ELSquot;Dave Petersonquot; wrote:

gt; You can't do this with formatting, but you can use another column with formulas
gt; like:
gt;
gt; =if(len(a2)lt;gt;2,a2,left(a2,1)amp;quot;-quot;amp;right(a2,1))
gt;
gt; ELS wrote:
gt; gt;
gt; gt; Hi all,
gt; gt; I have a bunch of cells in a column with two letters. I want to put a dash
gt; gt; (-) inbetween these two letters. Does anyone know how I can do that?? Please
gt; gt; help!
gt; gt; (These are for initials, so, i want to add a dash in place of a middle
gt; gt; initial for those initials that were entered with only two characters.)
gt; gt; So, basically, I want to format the column so that when there are only 2
gt; gt; characters in a cell, a dash will be inserted in the middle. When there are
gt; gt; 3 characters in the cell, they will be left alone.
gt; gt;
gt; gt; thanks!
gt; gt; --
gt; gt; ELS
gt;
gt; --
gt;
gt; Dave Peterson
gt;

Hi Again Dave,
Please ignore my last question.
I just realized on the formula I was referrening the wrong cell. So, that's
why i got 3 numbers as a result, instead of the 3 characters.

Thanks again for your help!!!
I really appreciate it!!!
--
ELSquot;Dave Petersonquot; wrote:

gt; You can't do this with formatting, but you can use another column with formulas
gt; like:
gt;
gt; =if(len(a2)lt;gt;2,a2,left(a2,1)amp;quot;-quot;amp;right(a2,1))
gt;
gt; ELS wrote:
gt; gt;
gt; gt; Hi all,
gt; gt; I have a bunch of cells in a column with two letters. I want to put a dash
gt; gt; (-) inbetween these two letters. Does anyone know how I can do that?? Please
gt; gt; help!
gt; gt; (These are for initials, so, i want to add a dash in place of a middle
gt; gt; initial for those initials that were entered with only two characters.)
gt; gt; So, basically, I want to format the column so that when there are only 2
gt; gt; characters in a cell, a dash will be inserted in the middle. When there are
gt; gt; 3 characters in the cell, they will be left alone.
gt; gt;
gt; gt; thanks!
gt; gt; --
gt; gt; ELS
gt;
gt; --
gt;
gt; Dave Peterson
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()