Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Type mis-match error

I have a macro that basically copies data from one worksheet to another
(within the same workbook). Below are two lines of code. The first
executes, but the second gives me a Run Time Error 13 - Type mismatch. I've
formatted all relevant cells the same, and all my variables are singles.

ReportSht.Cells(CurrRow, 4) = (MasterSht.Cells(i, 8) + _
MasterSht.Cells(i, 9)) * ReportSht.Cells(5, 3)

ReportSht.Cells(CurrRow, 6) = (MasterSht.Cells(i, 10) + _
MasterSht.Cells(i, 11)) * ReportSht.Cells(5, 3)
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Type mis-match error

Actually, all your values are Doubles -- since you're picking them up from the
worksheet directly.

I think I'd check each cell's value to see if it's numeric.

My bet is that you have a non-numeric value in one of those cells.



Marcotte A wrote:

I have a macro that basically copies data from one worksheet to another
(within the same workbook). Below are two lines of code. The first
executes, but the second gives me a Run Time Error 13 - Type mismatch. I've
formatted all relevant cells the same, and all my variables are singles.

ReportSht.Cells(CurrRow, 4) = (MasterSht.Cells(i, 8) + _
MasterSht.Cells(i, 9)) * ReportSht.Cells(5, 3)

ReportSht.Cells(CurrRow, 6) = (MasterSht.Cells(i, 10) + _
MasterSht.Cells(i, 11)) * ReportSht.Cells(5, 3)


--

Dave Peterson
Reply
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
xpath error? Runtime Error 13 type mismatch Steve M[_2_] Excel Discussion (Misc queries) 0 January 17th 08 01:16 AM
Error Type Mis Match Error 13 Gordon[_2_] Excel Programming 1 December 20th 04 02:40 PM
Application.Match Type mismatch error [email protected] Excel Programming 8 December 10th 04 09:58 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 03:03 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"