+ Reply to Thread
Results 1 to 2 of 2

refering to address

Hybrid View

  1. #1
    april27
    Guest

    refering to address

    i am making a macro for excel that searches a spreadsheet and then makes a
    chart. i do not know how to refer to the address of a cell properly. i search
    for cell by using the following function:

    Set rng = Worksheets("Indata").Cells.Find("Date", LookIn:=xlValues)

    In antother subroutine i want to create a chart. I want the range of the
    chart to start at the position where i found the word "Date". I recorded a
    macro making a chart. However i dont know how to change the reference. The
    code of the recorded macro:

    Range(someTextHere).Select

    I dont know what to write in someTextHere so that it refers to my cell.
    PLease please help me! I really cant figure it out and have tried different
    solutions!!!!

  2. #2
    Bob Phillips
    Guest

    Re: refering to address

    Use the Address property of the range object to get the address.

    But in your example, you have a range object, so just select that

    rng.Select

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "april27" <[email protected]> wrote in message
    news:[email protected]...
    > i am making a macro for excel that searches a spreadsheet and then makes a
    > chart. i do not know how to refer to the address of a cell properly. i

    search
    > for cell by using the following function:
    >
    > Set rng = Worksheets("Indata").Cells.Find("Date", LookIn:=xlValues)
    >
    > In antother subroutine i want to create a chart. I want the range of the
    > chart to start at the position where i found the word "Date". I recorded a
    > macro making a chart. However i dont know how to change the reference. The
    > code of the recorded macro:
    >
    > Range(someTextHere).Select
    >
    > I dont know what to write in someTextHere so that it refers to my cell.
    > PLease please help me! I really cant figure it out and have tried

    different
    > solutions!!!!




+ 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.6.0 RC 1