Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
mc mc is offline
external usenet poster
 
Posts: 3
Default ModifyCellText

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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
.

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



All times are GMT +1. The time now is 05:38 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"