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: 6
Default Strange data type error

The following Function scans four tax tables (married, single etc) and
calculates the tax on the prize amount.
The functon works for all elements of the tax tables excpt one cell which
when read causes a data type error.
Placing the mousel pointer over each of the code piece for each cell shows a
number with an numeric data type, ie
Sheet2Cells(i,5)=665421. That is, all but Sheet2Cells(i,4)="1064.12" which
is a string data type. An indipendent check shows the 1064.12 to be numeric.
I can't figure this one out

Thanks for any help on this.


Function TaxIt(Prize As Currency, Status As Integer) As Currency
For i = Status To Status + 5
If i = (Status + 5) Or (Prize Sheet2.Cells(i, 2) And _
Prize < Sheet2.Cells(i, 3)) Then
TaxIt = Sheet2.Cells(i, 4) + Sheet2.Cells(i, 5) * (Prize -
Sheet2.Cells(i, 2))
Exit For
End If
Next
End Function
 
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
Error: Value in Formula of wrong data type mak_nyce Excel Worksheet Functions 0 January 5th 10 06:04 PM
Strange error Andy Setting up and Configuration of Excel 1 April 18th 06 08:11 PM
Dictionary object: Error assigning user defined data type to item Paul Urbanus Excel Programming 2 December 1st 05 04:21 AM
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 when getting data from another workbook Tony Zappal Excel Programming 2 January 12th 05 10:29 PM


All times are GMT +1. The time now is 06:50 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"