+ Reply to Thread
Results 1 to 13 of 13

Move cursor to intersection of row and column

  1. #1
    Registered User
    Join Date
    02-08-2014
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    60

    Move cursor to intersection of row and column

    Hello, on the attached I have a table that calculates the distance between two zip codes. I have it conditionally formatted to highlight the row and column in blue and the intersection in yellow. What I have been trying to do for the last 6 hours is find out how to also move the cursor to the intersection when the zip codes in D1 and D2 are changed. Nothing seems to work. So, for example, in the attached the cursor should go to cell AB25 when D1 = 01226 and D2 = 92121.

    Thank you in advance and please let me know if more info is needed.

    Thanks! Shawn V.

    CAP-001 Scrapelist.xlsm

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,058

    Re: Move cursor to intersection of row and column

    Use the MATCH formulas to find the row and column for the zip codes.

    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    02-08-2014
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    60

    Re: Move cursor to intersection of row and column

    Thanks, Norie, but it doesn't seem to be working. I pasted it into the worksheet not in a module or workbook section. Not sure where I took a wrong step. I appreciate your help and quick response.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    5,620

    Re: Move cursor to intersection of row and column

    Hi Shawn. They only way I could get this to work was to unmerge all the cells in your worksheet. You should avoid merged cells if at all possible because they very often cause problems for Excel. Try the attached file and see if this is what you were looking for.
    Attached Files Attached Files
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,058

    Re: Move cursor to intersection of row and column

    Works fine for me, did you change anything?

  6. #6
    Registered User
    Join Date
    02-08-2014
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    60

    Re: Move cursor to intersection of row and column

    Quote Originally Posted by Mumps1 View Post
    Hi Shawn. They only way I could get this to work was to unmerge all the cells in your worksheet. You should avoid merged cells if at all possible because they very often cause problems for Excel. Try the attached file and see if this is what you were looking for.
    Thanks, I opened it and the cursor didn't move when I changed the zip code. Thanks for taking a look at it.

  7. #7
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    5,620

    Re: Move cursor to intersection of row and column

    Hi Shawn. That is very strange. I opened the attachment and tried it again and not only did the cursor move each time the ZIP or MSA was changed, the intersection cell was also selected. For me it worked as you requested.

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,058

    Re: Move cursor to intersection of row and column

    Do you have any other code in the workbook?

    Here's the file you uploaded with the code added.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    02-08-2014
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    60

    Re: Move cursor to intersection of row and column

    Quote Originally Posted by Mumps1 View Post
    Hi Shawn. They only way I could get this to work was to unmerge all the cells in your worksheet. You should avoid merged cells if at all possible because they very often cause problems for Excel. Try the attached file and see if this is what you were looking for.
    Thanks Mumps1, I tried your file and I unmerged my file and the cursor is still static. I am using 64-bit, does that have any influence?

  10. #10
    Registered User
    Join Date
    02-08-2014
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    60

    Re: Move cursor to intersection of row and column

    Quote Originally Posted by Norie View Post
    Do you have any other code in the workbook?

    Here's the file you uploaded with the code added.
    Tried it, Norie, but no dice. I'm using 64-bit, does that have any bearing?

  11. #11
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    5,620

    Re: Move cursor to intersection of row and column

    I don't think that should make any difference. I don't understand why it isn't working for you. I keep trying making different selections from the drop down lists in D1 and D2 and it works perfectly each time.

  12. #12
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,058

    Re: Move cursor to intersection of row and column

    Wouldn't think so.

    Are there any other workbooks open?

    When you enter this in the Immediate Window (CTRL+F8) that's the result?

  13. #13
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    5,620

    Re: Move cursor to intersection of row and column

    I tried Norie's attachment and it worked perfectly. His solution is better than mine because it works without having to unmerge the cells.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1