Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
EZK EZK is offline
external usenet poster
 
Posts: 4
Default Macro

Hi,

I was using the following macro for a very long time:

Sub Dash()

Dim komor As Range
For Each komor in ActiveSheet.UsedRange
If IsNumeric(komor.Value) = True Then
If komor.Value = 0 Then
komor.Value = "-"
Else
komor.Value = komor
End If
End If
Next komor

End Sub


The purpose of the macro is to replace zero values with "-".
I used it in big Excel files and then I used the Mail Merge
to get Word pages where the "-" means that the value
does not exist. In Word the values are in tables.
All It worked very well when I used Word 97 and Excel 97.

Now I have Word 2007 and Excel 2007. The macro works
properly, in the Excel sheet all zero values are replaced with "-".
However after the Mail Merge (prepared the same way as it
was in the 97) on the Word pages some of the values are
printed as zero, not as "-". (The others are printed properly
as "-").

The Excel files are really big, so the Word files include
a lot od pages and it is very difficult to change it manually.

I would be very grateful if someone could help me.

Regards,
EZK




 
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
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 3 February 5th 07 08:22 PM
using a cell value to control a counter inside a macro and displaying macro value ocset Excel Worksheet Functions 1 September 10th 06 05:32 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM


All times are GMT +1. The time now is 12:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"