ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   FormulaR1C1 (https://www.excelbanter.com/excel-programming/324252-formular1c1.html)

Aksel Børve

FormulaR1C1
 
Is it possible to mix relative ranges with other ranges?
Thanks

Sub DrillPipe1()
With Range("RngVrtDp1")
If ("RngVrtDp1") ("I3") Then
..FormulaR1C1 = "=(RC[-1])*(L9*0,01)"
Else
..FormulaR1C1 = "=(RC[-1])"
End If
End With
End Sub



Don Guillett[_4_]

FormulaR1C1
 
Haven't tried but don't think so. I usually use regular
..formula="=a1*b1"

--
Don Guillett
SalesAid Software

"Aksel Børve" wrote in message
...
Is it possible to mix relative ranges with other ranges?
Thanks

Sub DrillPipe1()
With Range("RngVrtDp1")
If ("RngVrtDp1") ("I3") Then
.FormulaR1C1 = "=(RC[-1])*(L9*0,01)"
Else
.FormulaR1C1 = "=(RC[-1])"
End If
End With
End Sub





Dick Kusleika[_4_]

FormulaR1C1
 
Aksel

No. Excel will put quotes around L9 and give you a #NAME? error. You can
use Application.ConvertFormula to covert an A1 style reference to R1C1,
though.


--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-blog.com

Aksel Børve wrote:
Is it possible to mix relative ranges with other ranges?
Thanks

Sub DrillPipe1()
With Range("RngVrtDp1")
If ("RngVrtDp1") ("I3") Then
.FormulaR1C1 = "=(RC[-1])*(L9*0,01)"
Else
.FormulaR1C1 = "=(RC[-1])"
End If
End With
End Sub





All times are GMT +1. The time now is 04:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com