Thread: ModifyCellText
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy[_2_] Patrick Molloy[_2_] is offline
external usenet poster
 
Posts: 1,298
Default ModifyCellText

your modified formula works as you expected. Are yuo sure you typed it in
correctly.


"mc" wrote:

I am using Excel 2007. I use the code below to copy the value to E2 and
add a period to middle initial. It all works fine except when there is
not a cell value to copy it returns a 0 to the E cell and I want the E
cell to remain empty. I tried to add "" to the false part of the if,
but it still copies a zero. What am I doing wrong?



I paste this formula into the E column

=IF(LEN(D2)=1,D2&".",D2) original code

=IF(LEN(D2)=1,D2&".","") my modified code

Thanks
.