Link to home
Start Free TrialLog in
Avatar of Conernesto
ConernestoFlag for United States of America

asked on

Access VBA code meaning

I have the below piece of code in a module. The code is run from Access and it's applied to an Excel spreadsheet. Can yo please describe what below code means as I may need to make a change?

 .Cells(44, C).Value = "=R[1]C-SUM(R[-8]C:R[-1]C)"
ASKER CERTIFIED SOLUTION
Avatar of Norie
Norie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Conernesto

ASKER

C appears to be the start column. What does the R stand for?
Avatar of Daniel Pineault
Daniel Pineault

R[1]C

R stands for Rows
C stands for Columns

in this form of notation the values are the offset from the current cell.  This is often referred to as R1C1 notation, see: https://bettersolutions.com/excel/formulas/cell-references-a1-r1c1-notation.htm
Thank you very much.

Conernesto


As Daniel has explained the R and C in the formula refer to rows and columns, but the R here,   

   .Cells(44, C).Value =  

Open in new window

is a variable and represents the column the formula will be placed in.


Great. Thank you.