View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Willow[_6_] Willow[_6_] is offline
external usenet poster
 
Posts: 1
Default Adding formula to a cell with VB


Hi

I need to add a formula to a cell ( actually a range of cells) uing
VB.

The formula is

=IF($U6="","",IF(OR($T6="Yes",$U6="Yes"),"HICA",IF ($E6="No
Notice","CALL","Notice")))

I would like to use something like:

Range("V2").Formula = "=IF(OR(T2="Yes",U2="Yes"),"HICA",IF(E2="No
Notice","CALL","Notice"))"


My problem is that the quotes in the formula are read as the end of the
string in the vb. Could anyone help please?

Thanks


--
Willow
------------------------------------------------------------------------
Willow's Profile: http://www.excelforum.com/member.php...o&userid=16070
View this thread: http://www.excelforum.com/showthread...hreadid=564642