Converting Excel Formula to VBA code RRS feed

  • Question

  • I have a formula that works in a cell but i would like to do it using VBA. Because i need the cell to register as empty to start.


    Wednesday, November 19, 2014 1:55 AM


  • Hi NYYFAN,

    For IF and OR function:

    If Range(“C8”).Value=”Work” Or Range(“C8”).Value=”Off” Then
    End If

    For COUNTIF function:


    On the other hand, to specify formula, you could use Range.Formula property.

    Best Regards


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, November 20, 2014 9:28 AM