When I copy column A and do a 'Paste Link' into column B, any blank cells in column A are converted to a '0' in column B. I've tried everything to prevent this from happening, with no joy.
Any ideas?
When I copy column A and do a 'Paste Link' into column B, any blank cells in column A are converted to a '0' in column B. I've tried everything to prevent this from happening, with no joy.
Any ideas?
unfortunately, as far as i know you cannot bypass that because you are linking to an empty cell that excel believes is a number and so shows a zero, however help is at hand, you can place this code on a standard module (Alt+F11, then right click on the left ahnd side and choose Insert, Module) then when you run the code from within the VBE or from a button or shortcut it should enter the correct formula to eliminate the 0's
![]()
Sub Eliminate_0() Dim Rng As Range, MyCell As Range Set Rng = Range("A1:A15") Rng.Copy Range("B1").Select ActiveSheet.Paste Link:=True Application.CutCopyMode = False For Each MyCell In Rng If MyCell.Value = "" Then MyCell.Offset(0, 1).Value = "=If(" & MyCell.Address & "=" & Chr(34) & Chr(34) _ & "," & Chr(34) & Chr(34) & "," & MyCell.Address & ")" End If Next End Sub
Not all forums are the same - seek and you shall find
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks