View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Alf[_13_] Alf[_13_] is offline
external usenet poster
 
Posts: 1
Default Problem writing formula


I'm trying to write a formula with VB but having problems.

Cell "C3" cotains a number (12,45) so I want to construct the formula
"=B12" in cell "K10".

Range("K10").Formula = "= b & Int(C3)"
This gives me a #NAME? error in K10.

Range("K10").Formula = "= "b" & Int(C3)"
VB says "Compile error Expected: End of Statement

Range("K10").Formula = "= ""b"" & Int(C3)"
This gives me the string value "b12" in "K12"

Could somebody please help me with the propper syntax for writing the
formula "=b12" in "K10".


--
Alf
------------------------------------------------------------------------
Alf's Profile: http://www.excelforum.com/member.php...fo&userid=7112
View this thread: http://www.excelforum.com/showthread...hreadid=558661