Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error: Value in Formula of wrong data type | Excel Worksheet Functions | |||
Strange error | Setting up and Configuration of Excel | |||
Dictionary object: Error assigning user defined data type to item | Excel Programming | |||
Help: Compile error: type mismatch: array or user defined type expected | Excel Programming | |||
Type Mismatch Error when getting data from another workbook | Excel Programming |