Empty Cell Returns A Zero?

rockyw

Well-known Member
Joined
Dec 26, 2010
Messages
1,196
Office Version
  1. 2010
Platform
  1. Windows
I have a code copy and paste from a column of cells. The cells I paste into have a condisional format. Even when the cell I copy out of is empty ( I do have a formula in here) , I still return a 0 in the cell I paste into, that screws up the condisional format. I have it set in options not to show zeros, how can I get this code NOT to show a 0 when it copys an empty cell? Thanks
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
How can I write this to point to sheet 2, E3
Code:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    Dim rMonitor As Range
    Dim rTarget As Range
    Set rMonitor = Range("E3")
    Set rTarget [COLOR=red]= Range("Sheet2", "E3")
[/COLOR]    
    If Not Intersect(Target, rMonitor) Is Nothing Then
        rMonitor.Copy rTarget
    End If
    Set rMonitor = Nothing
    Set rTarget = Nothing
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,613
Messages
6,179,894
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top