View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default help with macro syntax

replace:
Range("B" & R).GoalSeek goal:=0.42, ChangingCell:=Range("C" And R)
with:
Range("B" & R).GoalSeek goal:=0.42, ChangingCell:=Range("C" & R)

--
Gary''s Student - gsnu200832


"Steve" wrote:

getting type mismatch error.

Sub goalsk()
Dim R As Long 'Row
For R = 4 To 16
Range("B" & R).GoalSeek goal:=0.42, ChangingCell:=Range("C" And R)
Next R
End Sub