Type mismatch error

  • Thread starter Thread starter mpjohnston
  • Start date Start date
M

mpjohnston

Dim thingy As Integer

thingy = "=MATCH(""DiceC"",qperiodagentperformance!A:A,0)"

ActiveCell.Formula = _
"=INDEX(qperiodagentperformance!D" & thingy
":D13000,MATCH(""Agent Summary"",qperiodagentperformance!A" & thingy
":A13000,0))"
Range("D26").Select

my thingy doesnt seem to work..... no comment
Mik
 
Your DIM statement says that thingy is an integer variable. Then you try to
assign a string (text) to it. That won't work. Try

Dim thingy As String
 
Your code is all screwed up.

You assign a string to thingy, dim it as integer and expect a long

Dim thingy as Variant

thingy = Evaluate("MATCH(""DiceC"",qperiodagentperformance!A:A,0)")

if not iserror(thingy) then
ActiveCell.Formula = _
"=INDEX(qperiodagentperformance!D" & thingy & _
":D13000,MATCH(""Agent Summary"",qperiodagentperformance!A" & thingy & _
":A13000,0))"

End if
 
And see a few more replies at your other post.

mpjohnston < said:
Dim thingy As Integer

thingy = "=MATCH(""DiceC"",qperiodagentperformance!A:A,0)"

ActiveCell.Formula = _
"=INDEX(qperiodagentperformance!D" & thingy &
":D13000,MATCH(""Agent Summary"",qperiodagentperformance!A" & thingy &
":A13000,0))"
Range("D26").Select

my thingy doesnt seem to work..... no comment
Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top