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: 60
Default Type Mismatch Error

Here is my code:

Dim LastCell As Long
LastCell = Cells(Rows.Count, 1).End(xlUp)
Range("H2").Select
ActiveCell.FormulaR1C1 = _

"=SUMPRODUCT(COUNTIF(RC[1],{""*MILLERSTEVENM*"",""*PISCOPOGINA*"",""*LASKAAN THO*"",""*NELSONBECKY*""})*{1,2,3,4})"
Range("H3").Select
ActiveCell.FormulaR1C1 = _

"=SUMPRODUCT(COUNTIF(RC[1],{""*MILLERSTEVENM*"",""*PISCOPOGINA*"",""*LASKAAN THO*"",""*NELSONBECKY*""})*{1,2,3,4})"
Range("H2:H3").Select
Selection.Copy
Range("R6:R" & LastCell).Select
Selection.AutoFill Destination:=Range("R6:R" & LastCell),
Type:=xlFillDefault

I keep get a Type Mismatch error on the designation of lastcell. Is this
because I have 5455 records? Or some other reason that is not currently
available in the knowledge base?

From the knowledge base (although info only goes up to Excel9; I am working
with Excel 11):
The maximum number of elements in the array is limited by available memory
or the Excel worksheet maximum size (65536 rows X 256 columns). However, the
maximum number of elements in the array that you can pass to Excel using the
Excel Transpose function is 5461. If you exceed this limit, you receive the
following error message:
Run-time error '13':
Type Mismatch
 
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
Visual Basic Error Run Time Error, Type Mismatch Meg Partridge Excel Discussion (Misc queries) 12 September 10th 08 06:10 PM
keep getting type mismatch error vbidiot Excel Programming 4 February 15th 06 08:42 PM
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Excel Programming 1 October 31st 05 08:20 PM
Type mismatch error mpjohnston[_2_] Excel Programming 3 August 31st 04 12:33 AM
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error rdavis7408 Excel Programming 1 August 25th 04 03:54 AM


All times are GMT +1. The time now is 05:26 AM.

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

About Us

"It's about Microsoft Excel"