referencing another worksheet in a formula

G

Guest

Afternoon,

As titled really, I'm sure it'll be easy for you clever lot. The other sheet
is called Refnumbers. Here's the code so far:

Dim i As Integer
Dim j As Integer
i = 6
j = 1

Do While i <> x
Cells(i, j).Select
Select Case Cells(i, j).Value
Case 100, 101, 102, 103, 104, 105, 106, 107, 110, 141, 160, 171, 191
Cells(i, j + 2).Select
Dim answer As String
**answer = Cells(i, j + 1).Value * Refnumbers!Cells(5, 2).Value**
ActiveCell.Formula = answer
i = i + 1
etc

The debugger sticks on the line with ** at each end.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top