Results 1 to 4 of 4

Thread: Grid Problem.

  1. #1
    3 Star Lounger
    Join Date
    Sep 2002
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Grid Problem.

    Ok.. this is really an Access problem i have with some labels.... but i guess it doesn't belong there, and i'm useless at math...

    so here's the problem..

    I have a grid, running 1 to 64 like this:-

    01.09.17.25
    02.10.18.26
    03.11.19.27
    04.12.20.28
    05.13.21.29
    06.14.22.30
    07.15.23.31
    08.16.24.32

    all the way to 64, so its an 8 x 8 grid.

    Using just the number, i need a formula to define the position. both Row, and Column

    Var MyRow =.........
    Var Mycolumn =.......

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Grid Problem.

    Let's say the number is stored in the variable MyNumber

    MyRow = (MyNumber - 1) Mod 8 + 1
    MyColumn = (MyNumber - 1) 8 + 1

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Grid Problem.

    Not sure of the access formula but in XL the row is:
    =MOD(Number-1,8)+1

    and the column is:
    =INT((number-1)/8)+1

    Steve

  4. #4
    3 Star Lounger
    Join Date
    Sep 2002
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Grid Problem.

    Muchos Gracias.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •