E
EZK
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
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