+ Reply to Thread
Results 1 to 2 of 2

Thread: Help with creating a coordinate system and highlighting a cell in it

  1. #1
    Registered User
    Join Date
    12-26-2008
    Location
    Sweden
    Posts
    8

    Help with creating a coordinate system and highlighting a cell in it

    Hi,
    Is it possible to create a grid of say 100x100 cells i excel, and then write out a coordinate and in that way highlight that cell?
    I attach a picture of how i imagine it.

    // Hella
    Attached Images Attached Images

  2. #2
    Forum Guru
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    1,798

    Re: Help with creating a coordinate system and highlighting a cell in it

    Does this code work/help with your problem?

    Sub Highlight_Coord()
        Dim anch As Range
        Dim xCoor As Long
        Dim yCoor As Long
        
        Set anch = Range("$B$100") 'use this bit of code to determine the starting point of your grid
        'This code represents point 0 on the grid. In this case, the grid starts at cell B2
        
        xCoor = -Range("A1").Value 'Enter in cell A1 the x coordinate
        yCoor = Range("A2").Value - 1 'Enter in Cell A2 the y coordinate
        
        anch.Offset(xCoor, yCoor).Interior.ColorIndex = 36
        
        
    End Sub
    Last edited by BigBas; 01-23-2012 at 03:22 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0