S'OK live and learn, give my little forumlas a test, might be helpful to you 
The sprite index assumes numbering the sprites left to right, top to bottom starting at 0 for first sprite. I would prefer starting at 1 so the top index is the number of sprites but that complicates the math a bit.
So top index is SPR * SPC -1, minus 1 because we start at 0.
Mod is modulus = the remainder left after dividing index by SPC (sprites per...
Dang I think I switched SPR with SPC, oops sorry
SX = (I mod SPR) * SW
SY = int(I / SPC) * SH
Sprites per row, SPR, is how many sprites across the sheet
Sprites per column, SPC, is how many sprites down the sheet
I will dig up an old proggie to verify these...

The sprite index assumes numbering the sprites left to right, top to bottom starting at 0 for first sprite. I would prefer starting at 1 so the top index is the number of sprites but that complicates the math a bit.
So top index is SPR * SPC -1, minus 1 because we start at 0.
Mod is modulus = the remainder left after dividing index by SPC (sprites per...
Dang I think I switched SPR with SPC, oops sorry
SX = (I mod SPR) * SW
SY = int(I / SPC) * SH
Sprites per row, SPR, is how many sprites across the sheet
Sprites per column, SPC, is how many sprites down the sheet
I will dig up an old proggie to verify these...
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever

