Hi All, I'm VERY new to VBA. I can write formulas in excel plenty but VBA is quite different.
I have a workbook that has volume changes in data from month to month. What I want to do is write a Macro to reference a cell name(ex. "Plan ABC) and then kick off the following code in the cell offset(5, 10)
Sub ERRP_BenBillingDetail()
'
' ERRP_BenBillingDetail Macro
' ERRP Credit update for the Benefit Billing Detail Tab
'
'
Do
ActiveCell.FormulaR1C1 = "=IF(RC[-2]=""Employee Only"",RC[-1]+9.43,IF(OR(RC[-2]=""Employee and One Dependent"",RC[-2]=""Employee and Spouse or Domestic Partner""),RC[-1]+18.86,IF(RC[-2]=""Family"",RC[-1]+26.69,"""")))"
ActiveCell.Offset(1, 0).Select
Loop Until IsEmpty(ActiveCell.Offset(0, -1))
End Sub
How do I write a code to reference the name of a cell and start the formula above in another cell?
Thanks in advance for any help!!!!
I have a workbook that has volume changes in data from month to month. What I want to do is write a Macro to reference a cell name(ex. "Plan ABC) and then kick off the following code in the cell offset(5, 10)
Sub ERRP_BenBillingDetail()
'
' ERRP_BenBillingDetail Macro
' ERRP Credit update for the Benefit Billing Detail Tab
'
'
Do
ActiveCell.FormulaR1C1 = "=IF(RC[-2]=""Employee Only"",RC[-1]+9.43,IF(OR(RC[-2]=""Employee and One Dependent"",RC[-2]=""Employee and Spouse or Domestic Partner""),RC[-1]+18.86,IF(RC[-2]=""Family"",RC[-1]+26.69,"""")))"
ActiveCell.Offset(1, 0).Select
Loop Until IsEmpty(ActiveCell.Offset(0, -1))
End Sub
How do I write a code to reference the name of a cell and start the formula above in another cell?
Thanks in advance for any help!!!!