If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Formula Property - Referencing Strings Inside Formula Property Value
Would anyone know how to refer to a string inside the
formula property value? In my case I am checking a named cell to see if it is holding a specified string and if so want the cell formula to have the cell with the formula be blank, otherwise have a value of 2, as per below: Worksheets(1).Cells(23, 8).Formula _ = "=if(itemnmlnk1 "StockOut", "", 2)" However, though the formula works fine when inserted directly in the cell, the formla property returns An "Application-defined or object-defined error". I am thinking it is because I am using the string quotes inside the Formula property value quotes and the interpreter is having a problem with quotes inside of quotes? So I am thinking there must be some character to type in front of the quotes to indicate to the interpreter to allow the quotes to be used in the formula? Thank you much |
Thread Tools | |
Display Modes | |
|
|