Solved

# Coding a varible into the R1C1 formula format in AB for applications.

Posted on 2006-05-01
261 Views
Need to code a sum formula into a cell using R1c1 formula

The foruula will be placed in row 3.  The range will be from row 5 to the last row of data in the column (lRow).
All in the same column. What I have does not work:

fRow = 5
lRow = Range("A65535").End(xlUp).Row
pA = "=sum(R[2]C:R[lRow]C)"
Cells(fRow - 2, 242).FormulaR1C1 = pA

I receive a run-time error "10004". Prgram works if I substite a number for lrow but I need a varible tht changes daily and want to keep lRow

Thanks
0
Question by:VFioramonti

LVL 37

Accepted Solution

pA = "=sum(R[2]C:R[" & lRow & "]C)"
0

Author Comment

Thank you - of course. Big time help
0

LVL 37

Expert Comment

0

## Featured Post

### Suggested Solutions

Purpose To explain how to place a textual stamp on a PDF document.  This is commonly referred to as an annotation, or possibly a watermark, but a watermark is generally different in that it is somewhat translucent.  Watermark’s may be text or graph…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…