VBA runtime error 13 - Type Mismatch

karan2807

New Member
Joined
Jan 5, 2022
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hi Team ,

I need to get the whole row value from a 2d array but I am getting the runtime error 13 - Type Mismatch error.

I am using the following expression.

arr1 = Application.WorksheetFunction.Index(SparepartData, 1, 0)

sparepartdata = Array.



Please help
 
Thanks for posting the code, unfortunately there is no way of testing it at this end so I cannot tell why you are getting the error.


Is this expression also depends on the number of columns ?? because when I am having 15 columns in this array I am getting this error but when I am reducing column to 3 this expression works fine.
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
It may have something to do with the Null values in the array, but as I have never seen that & don't know for certain.
 
Upvote 0
Thanks for posting the code, unfortunately there is no way of testing it at this end so I cannot tell why you are getting the error.
Hey , One strange thing I have noticed that my array contains 15 column and in that case I am getting this error. If I am reducing columns to 3 the expression is working. any comments on this
 
Upvote 0
Please stop duplicating your posts, you have already said that & I have replied in post#12
 
Upvote 0

Forum statistics

Threads
1,214,601
Messages
6,120,465
Members
448,965
Latest member
grijken

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top