December 24th, 2007, 2:33 pm
I've encountered a slightly odd problem:I want to use VBA code to insert an Excel IF statement into the first row of a certain column. The IF statement, conditions on certain word existing in a different column of the same row.The IF statement contains the symbols " " around the words I am looking for.my problem is that it seems that in order to insert the IF condition, I need to wrap it with " " and would thus use the following:="IF(RIGHT(A2,21)="MAC",LEFT(A2,LEN(A2)-21)&M2,A2)"to insert the formula into the cell.VBA is getting confused, and reading the second " as a closing of the statement I want to insert into cell, thus making the code meaningless.Any thoughts?Bronto