Hey there! I am trying to get some code to work and had a friend help me try to clean it up. It worked when he ran through it, but now I am getting a Compile Error. I have made the line where the error occurs bold. The string of code is as follows:
I would also like to add that I renamed Sheet4 (CharityCare).
Dim lastRow As Long
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
'Categorize as Insured or Uninsured (Charity)
lastRow = Range(Range("A10"), Range("A10").End(xlDown)).Count + 9
With ws_CharityCare
.Activate
.Range("B10:B" & lastRow).Formula = "=IF(RC[7]>1,""Insured"",""Uninsured"")"
'Create Fiscal Year Based Off of Discharge Date (Charity)
.Range("K10:K" & lastRow).Formula = "=YEAR(RC[-7])+(MONTH(RC[-7])>='FY Calculation'!R[-8]C[-10])"
Thanks!
I would also like to add that I renamed Sheet4 (CharityCare).
Dim lastRow As Long
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
'Categorize as Insured or Uninsured (Charity)
lastRow = Range(Range("A10"), Range("A10").End(xlDown)).Count + 9
With ws_CharityCare
.Activate
.Range("B10:B" & lastRow).Formula = "=IF(RC[7]>1,""Insured"",""Uninsured"")"
'Create Fiscal Year Based Off of Discharge Date (Charity)
.Range("K10:K" & lastRow).Formula = "=YEAR(RC[-7])+(MONTH(RC[-7])>='FY Calculation'!R[-8]C[-10])"
Thanks!
Last edited: