Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm making a withholdings calculator which basically has to find which
step the gross wages for the pay period are, for this i have sub FindStep() Dim R as Range Dim myTot as String Dim myAmt as String Dim myPerc as String Dim myBeg as String For Each R in Range("A2:A8") If myTot = R.Value Then If myTot < R.Offset(0,1).Value Then myAmt = R.Offset(0,2).Value myPerc = R.Offset(0,3).Value myBeg = R.Value End If End If Next R End Sub now myTot is being set my an earlier equation that calculates some entries in a form, when i step through the code, i get things like myTot = "793.08", R.Value = 385 and R.Offset(0,1).Value = 1240 which as far as i can tell should meet the criteria I've set (I want it to meet the criteria, but the other variables never get set, so it crashes when they are used in the final calculation. Any idea what i'm doing wrong? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Getting correct results for lookup? | Excel Discussion (Misc queries) | |||
what formulas will give correct results | Excel Discussion (Misc queries) | |||
Finding Correct Answer | Excel Worksheet Functions | |||
SQL Query not returning correct results | Excel Programming | |||
Adding columns to get correct results | Excel Programming |