Results 1 to 5 of 5
  1. #1
    Graeme Cannell
    Guest

    Returning co-ordinates of the active cell (Excel 2000)

    I wish to find when a header occurs in a column (always in the first row) and return the co-ordinates of this cell as, for example 1,1 (not as A1), using a macro. The next 20 entries in that column are then copied to a different workbook. The header can be found by:

    Cells.Find(What:="Sequence", After:=ActiveCell).Activate

    however I have been unable write code to return the cell co-ordinates where the header was found. Does anyone have any code that can achieve this?

    Graeme

  2. #2
    Star Lounger
    Join Date
    Jun 2001
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Returning co-ordinates of the active cell (Excel 2000)

    If you've already activated the cell, then activecell.column can be used as the 2nd coordinate (you said the row is always 1.

  3. #3
    Graeme Cannell
    Guest

    Re: Returning co-ordinates of the active cell (Excel 2000)

    Bob

    I have just tested your suggestion and it works perfectly, thank you. Out of interest, if the string was in any cell how would you amend the code?

    Thanks

    Graeme

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

    Re: Returning co-ordinates of the active cell (Excel 2000)

    The column would be the same. The row would be ActiveCell.Row.
    Legare Coleman

  5. #5
    Graeme Cannell
    Guest

    Re: Returning co-ordinates of the active cell (Excel 2000)

    Thanks

    Graeme

Posting Permissions

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