Circular Reference

  • Thread starter Thread starter Johnny B
  • Start date Start date
J

Johnny B

One of my works book keeps telling me there is a circular ref
somewhere. I used this:

Sub FindCirRef()


Dim RefCell As Range
Dim Counter As Long


For Counter = 1 To 4


Set RefCell = Worksheets("Sheet1").CircularReference
RefCell.Copy
Worksheets("Sheet2").Cells(Counter, 1).PasteSpecial
Paste:=xlPasteFormulas
Worksheets("Sheet2").Cells(Counter, 2).Value = CStr(RefCell.Address)
RefCell.ClearContents


Next Counter


End Sub

to locate the ref. but it says that in line "Paste:=xlPasteFormulas"
there is a syntax error.

I do not know VBA , what do I do to find the circ.ref. ??

Thanks,
 
Hi Johnny,

A circular reference is usually because you are including the cell where the
formula is in the formula. eg. Sum(A1:A10) and the formula is in one of the
cells in the range A1:A10 that you are trying to sum.
 
Back
Top