Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Function WhichBox(piIndex As Integer) As Integer
If piIndex < 5 Then WhichBox = 1 ElseIf piIndex < 9 Then WhichBox = 2 ElseIf piIndex < 13 Then WhichBox = 3 Else WhichBox = 4 End If End Function I am going round in loops with / and mod - I am sure I can do it with one line of code, but how do I do it please, i.e. PiIndex Returns 1 to 4 1 5 to 8 2 9 to 12 3 13 to 16 4 -- Mike |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help me simplify this function.... | Excel Worksheet Functions | |||
simplify a vlookup function | Excel Worksheet Functions | |||
simplify function | Excel Worksheet Functions | |||
Simplify Vlookup function in Excel | Excel Worksheet Functions | |||
Simplify CrossJoin function | Excel Programming |