# Error trying to create RIC1 Formula

#### JohnM3

##### New Member
Hi

I am trying to put the values 1 to 20 in a range in Column A.

I do not want to use a loop.

The above value 20 is a user variable input and code defines
the creation of the range address prior to (attempting) to
create a R1C1 formula.

The cell above the value 1 (above) has the word TIME in it.

Here are my attempts at trying to create the values
using R1C1 notation. In each case what is returned is #NAME

Code:
``````    '---------------------
'   Time Matrix
'---------------------
With WS_BD
Set Rng_BD_Time_Column = .Range(.Cells(Rng_BD_Time_Word.Row + 1, 1), _
.Cells(Rng_BD_Time_Word.Row + 1, 1).Offset(Rng_BD_Row_Gen_Rows_Value - 1, 0))
End With

'''''\$A\$19:\$A\$63

'1st Try
'Rng_BD_Time_Column.FormulaR1C1 = "=IF(ISNUMERIC(R[-1]C), 1 + R[-1]C,1)"
'Returns #NAME

'2nd Try
'Rng_BD_Time_Column.FormulaR1C1 = "=IF(ISNUMERIC(R[-1]C), 1 + R[-1]C," & 1 & ")"
'Returns #NAME

'3rd Try
'Rng_BD_Time_Column.FormulaR1C1 = "=IF(ISNUMERIC(R[-1]C)," & 1 & "+ R[-1]C," & 1 & ")"
'Returns #NAME``````

Thanks in advance if anyone can resolve this.

regards
JOHN

Last edited:

### Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hi John,

"=IF(ISNUMBER(R[-1]C), 1 + R[-1]C,1)"

M.

Hi Marcelo

That DID it. Works great.

Thanks!

regards
John

You are welcome and thanks for the feedback

M.

Replies
2
Views
509
Replies
8
Views
334
Replies
1
Views
288
Replies
7
Views
406
Replies
5
Views
1K

1,212,059
Messages
6,105,659
Members
447,974
Latest member
misspancake

### 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.

### Which adblocker are you using?

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

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