Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Type mismatch error
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 -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Type mismatch error
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 On Mon, 30 Aug 2004 15:12:43 -0500, mpjohnston wrote: 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 --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Type mismatch error
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 -- Regards, Tom Ogilvy "mpjohnston " wrote in message ... 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 --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Type mismatch error
And see a few more replies at your other post.
"mpjohnston <" wrote: 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 --- Message posted from http://www.ExcelForum.com/ -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Visual Basic Error Run Time Error, Type Mismatch | Excel Discussion (Misc queries) | |||
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error | Excel Programming | |||
Type Mismatch error | Excel Programming | |||
help with type mismatch error | Excel Programming | |||
Type mismatch error | Excel Programming |