Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,814
Default help with macro syntax

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,814
Default help with macro syntax

thank you. i should have caught that.

"Gary''s Student" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Correct syntax for IF, Then in a macro Ken[_2_] Excel Worksheet Functions 5 June 21st 08 06:19 PM
Copy And Paste Macro Syntax Problem Minitman Excel Worksheet Functions 2 March 27th 08 01:59 AM
macro syntax for selecting variable range Matt Excel Discussion (Misc queries) 1 October 31st 07 07:13 PM
question about syntax in a simple macro... Dave F Excel Discussion (Misc queries) 3 November 3rd 06 02:12 PM
VBA: syntax to review macro names in a file? [email protected] Excel Discussion (Misc queries) 2 September 7th 05 10:01 PM


All times are GMT +1. The time now is 07:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"