LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Evaluate Method Returns Type Mismatch

This is so strange I'm not sure how to ask.

I have a procedure that opens each workbook in a given folder. With
each workbook some code is applied. The workbook object and excel
instance are destroyed and then the loop goes to the next workbook,
etc.

I have this statement that is applied to each workbook:

CurrentRow = Evaluate("=MATCH(""" & Cell.Value & """,Survey_Questions,
0)+ROW(Survey_Questions)-1")

'Cell.Value is the string "Phone Support"
'Survey_Questions is a named range that contains as list of string
values, including "Phone Support"

So the formula would read:
=MATCH("Phone Support",Survey_Questions,0)+ROW(Survey_Questions)-1

This formula returns the row where the Cell.Value is located. However,
the statement produces a type mismatch error. If I run just the
formula in the Immediate window and then paste that into the worksheet
it works.

Why am I getting the type mismatch error.

Also, I know there are other ways to get the row. This is just an
example.

tod
 
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
Type mismatch error in Find method JLGWhiz Excel Programming 1 April 9th 07 03:51 AM
Type Mismatch: array or user defined type expected ExcelMonkey Excel Programming 4 July 6th 06 03:40 PM
Type mismatch using rnge as Range with Type 8 Input Box STEVE BELL Excel Programming 11 December 3rd 05 05:02 AM
Type Mismatch Error when using InputBox Method Anolan Excel Programming 1 November 22nd 05 07:35 PM
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Excel Programming 1 October 31st 05 08:20 PM


All times are GMT +1. The time now is 09:27 AM.

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"