So this code is supposed to find the column titled "Ingredient Cost Paid". For each cell in this column, this code is supposed to output the right two characters of the cell content in the adjacent cell. This is just a test function. I know I could have just used VBA RIGHT.
The actual formula I'm trying to use is =IF(AND(CODE(RIGHT(A1))>74,CODE(RIGHT(A1))<>123),-1,1)*(10*LEFT(A1,LEN(A1)-1)+IF(CODE(RIGHT(A1))>120,0,CODE(RIGHT(A1))-IF(CODE(RIGHT(A1))>73,74,IF(CODE(RIGHT(A1))>64,64,48))))/100 where A1 is the targeted cell.
When I try to execute the sub, I get "Run-time error ' 1004: Application-defined or objected defined error" on line "Cells(i, colNum + 1).Formula = sFormula.
Bookmarks