Results 1 to 9 of 9
  1. #1
    4 Star Lounger
    Join Date
    May 2004
    Location
    Toronto, Ontario, Canada
    Posts
    425
    Thanks
    5
    Thanked 0 Times in 0 Posts

    ASCII tab (Excel 2000)

    Hi all,

    I'm using a reading device that automatically inputs into an Excel Spreadsheet, then it offsets itself by 1, using tab within its own program. It works great, except I would like to stay within a 10 X 10 array. The reading device inputs numbers, what I would like to do is, when it gets to a certain cell , populates I would like it to offset to a range that I specify. I did a search in here, and on google....Does anyone know of a thread that might help me out.

    Thanks,
    Darryl.

  2. #2
    4 Star Lounger
    Join Date
    May 2004
    Location
    Toronto, Ontario, Canada
    Posts
    425
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: ASCII tab (Excel 2000)

    I think I figured it out!!!!

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

    Re: ASCII tab (Excel 2000)

    That is very nice. Perhaps you could give a brief indication of what you did, for the edifications of others reading this thread.

  4. #4
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ASCII tab (Excel 2000)

    You can use the worksheet change event routine to control where the selection goes.
    Legare Coleman

  5. #5
    4 Star Lounger
    Join Date
    May 2004
    Location
    Toronto, Ontario, Canada
    Posts
    425
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: ASCII tab (Excel 2000)

    I thought that I figured it out, but didn't

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Sheets("Sheet1").Range("J3").Value > 0 Then
    Range("A4").Select
    end if

    End Sub

    How would I just do this once instead of with every change selecting A4?
    <img src=/S/bash.gif border=0 alt=bash width=35 height=39>
    Thanks Darryl.

  6. #6
    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: ASCII tab (Excel 2000)

    Something like this perhaps? It will only go to A4 when J3 is changed, not any change.

    <pre>Option Explicit
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("J3")) Is Nothing Then
    If Range("J3") > 0 Then Range("A4").Select
    End If
    End Sub</pre>


    Or are you looking for something like:
    <pre>Option Explicit
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("J:J")) Is Nothing Then
    Cells(Target.Row + 1, 1).Select
    End If
    End Sub</pre>


    which goes to col a of the next row whenever you make a change to a cell in column J.

    Steve

  7. #7
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ASCII tab (Excel 2000)

    You will need to give a better description of what you want to do. You said something about staying in a 10x10 grid. What 10x10 grid? Exactly how do you want the selection to move within that grid. Do you ever want to allow selecting a cell outside that grid?
    Legare Coleman

  8. #8
    4 Star Lounger
    Join Date
    May 2004
    Location
    Toronto, Ontario, Canada
    Posts
    425
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: ASCII tab (Excel 2000)

    Thanks Steve It works great.

    Cells(Target.Row + 1, 1).Select What does the 1 stand for after the comma?

    Darryl.

  9. #9
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: ASCII tab (Excel 2000)

    The 1's represent row and column index numbers. Similar to Offset(1,0). (One row down and 0 columns left or right!)

    Cells(Target.Row + 1, 1). = move one row down from the current row and back to the 1st column.
    Regards,
    Rudi

Posting Permissions

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