Intermittent Formula error for dynamic range excel 2010

 hello all, I have a combo box in a user form that is using this

Private Sub UserForm_Initialize()
'Populate combo box.
Dim rngBoProbsOpps As Range
Dim ws As Worksheet
Set ws = Worksheets("Sheet2")
Me.cmbProblemsOpps.RowSource = "BoProbsOpps"
End Sub

and this in my spreadsheet

=OFFSET(Sheet2!$A$2:Sheet2!$B$2, 0, 0, COUNTA(Sheet2!$A:$A:Sheet2!$B:$B)-1,2)

it work fine for days then I get an error on my user form and go to the spreadsheet and the formula has ref! errors like

=OFFSET(Sheet2!#REF!:Sheet2!#REF!, 0, 0, COUNTA(Sheet2!$A:$A:Sheet2!$B:$B)-1,2)

Anyone know what could be causing this, I am continuing to build other form sections  and test but this keeps happening.

Thanks

July 9th, 2013 7:13pm

If row 2 (or even just the range A2:B2) is deleted, the reference to A2:B2 would become invalid. Try defining the name as

=OFFSET(INDIRECT("Sheet2!$A$2"),0,0,COUNTA(Sheet2!$A:$A)-1,2)

Free Windows Admin Tool Kit Click here and download it now
July 10th, 2013 1:37am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics