Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
my first attempt at R1C1 in vba
Is a miserable failure.
Hi all - Just trying to subtract E from D rows ever expanding and contracting. "Compile error: Expected: end of statement" When I enter after typing this bit of code: With frmRng .FormulaR1C1 = RC[-2] - RC[-1] 'This line appears red Full code below Thanks much -goss '''''''''''''''''''''''''''''''''''''''' Sub wa_splh_analysis() Dim wbBook As Workbook Dim wsPayrollData As Worksheet Dim wsLaborAnalysis As Worksheet Dim lngRows As Long Dim copyRng As Range Dim destRng As Range Dim frmRng As Range Dim C As Range Application.ScreenUpdating = False Application.Calculation = xlCalculationManual Application.DisplayAlerts = False Set wbBook = ThisWorkbook With wbBook Set wsPayrollData = .Worksheets("Payroll_Data") Set wsLaborAnalysis = .Worksheets("LaborAnalysis") End With '''''''''''''''''''''''''''''''''''''''''''''''''' ''''' 'Get Hours With wsPayrollData lngRows = Range("A65536").End(xlUp).Row Set copyRng = .Range("M3:N" & lngRows) End With With wsLaborAnalysis Set destRng = .Range("D3") End With copyRng.Copy With destRng .PasteSpecial xlPasteValuesAndNumberFormats .PasteSpecial xlPasteFormats End With '''''''''''''''''''''''''''''''''''''''''''''''''' ''''' 'Formula With wsLaborAnalysis Set frmRng = .Range("F4:F" & lngRows) End With With frmRng .FormulaR1C1 = RC[-2] - RC[-1] End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
my first attempt at R1C1 in vba
|
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
my first attempt at R1C1 in vba
|
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
my first attempt at R1C1 in vba
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
help on Converting R1C1 to A1 and A1 to R1C1..tia sa2 | Excel Discussion (Misc queries) | |||
help on Converting R1C1 to A1 and A1 to R1C1..tia sa2 | Excel Worksheet Functions | |||
Sumproduct - Second Attempt | Excel Worksheet Functions | |||
'of' percentage with calculation (attempt 2) | Excel Discussion (Misc queries) | |||
1st attempt vba-how do i whatnext in this sub | Excel Programming |