emailcolink
New Member
- Joined
- Mar 31, 2015
- Messages
- 37
Hello,
I'm trying to apply an if statement with VBA to a cell, but it's not having it.
Running this I get an "Application-defined or object-defined error."
This is the last piece of a very large and lengthy project, which is probably why it won't work
Anyone see the problem?
I'm trying to apply an if statement with VBA to a cell, but it's not having it.
Code:
Dim iRow, ingredientRow As Integer
iRow = 151
ingredientRow = 60
Cells(iRow, 3).Formula = "=IF(C" & ingredientRow & ">0,C" & ingredientRow & ","")"
Running this I get an "Application-defined or object-defined error."
This is the last piece of a very large and lengthy project, which is probably why it won't work

Anyone see the problem?