+ Reply to Thread
Results 1 to 7 of 7

VBA code using Find to locate text and display the Cell Range.

Hybrid View

  1. #1
    slimla
    Guest

    VBA code using Find to locate text and display the Cell Range.

    Hi is there a where a way to display the Column and Row Number on the vb code?

    Thanks

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644
    What do you mean?

    Can you post the code you are using?
    Msgbox ActiveCell.Row
    Msgbox ActiveCell.Column

  3. #3
    Mike Fogleman
    Guest

    Re: VBA code using Find to locate text and display the Cell Range.

    VB code does not have Columns and Rows, just lines.
    "slimla" <slimla@discussions.microsoft.com> wrote in message
    news:F4294A60-4A7C-498E-92D9-139786120C00@microsoft.com...
    > Hi is there a where a way to display the Column and Row Number on the vb
    > code?
    >
    > Thanks




  4. #4
    slimla
    Guest

    Re: VBA code using Find to locate text and display the Cell Range.

    Actually,

    What I'm trying to achieve is selecting the Range from a Activecell to a
    specfic number.

    Since my Activecell is not constant, that why I have to first use the Find
    Function then select the cell 10 below plus 10 cells down and copy and paste
    it somewhere else.



    "Mike Fogleman" wrote:

    > VB code does not have Columns and Rows, just lines.
    > "slimla" <slimla@discussions.microsoft.com> wrote in message
    > news:F4294A60-4A7C-498E-92D9-139786120C00@microsoft.com...
    > > Hi is there a where a way to display the Column and Row Number on the vb
    > > code?
    > >
    > > Thanks

    >
    >
    >


  5. #5
    LabElf
    Guest

    Re: VBA code using Find to locate text and display the Cell Range.

    I think I can answer part of your question. To get the row and column of
    your active cell, you coud use:
    iColumn = ActiveCell.Column
    iRow = ActiveCell.Row

    I don't know what you mean by "the cell 10 below plus 10 cells down", but if
    you want to access the cell 10 rows below the active cell and the same
    column, you could use:
    ActiveCell.Offset(10, 0)

    If you want to select the range from the active cell to the cell 10 rows
    below, you could do:
    Range(ActiveCell, ActiveCell.Offset(10, 0)).Select

    Does that help?
    --
    Assigning guilt doesn't solve the problem


    "slimla" wrote:

    > Actually,
    >
    > What I'm trying to achieve is selecting the Range from a Activecell to a
    > specfic number.
    >
    > Since my Activecell is not constant, that why I have to first use the Find
    > Function then select the cell 10 below plus 10 cells down and copy and paste
    > it somewhere else.



  6. #6
    slimla
    Guest

    Re: VBA code using Find to locate text and display the Cell Range.

    Thanks that's what I need.

    "LabElf" wrote:

    > I think I can answer part of your question. To get the row and column of
    > your active cell, you coud use:
    > iColumn = ActiveCell.Column
    > iRow = ActiveCell.Row
    >
    > I don't know what you mean by "the cell 10 below plus 10 cells down", but if
    > you want to access the cell 10 rows below the active cell and the same
    > column, you could use:
    > ActiveCell.Offset(10, 0)
    >
    > If you want to select the range from the active cell to the cell 10 rows
    > below, you could do:
    > Range(ActiveCell, ActiveCell.Offset(10, 0)).Select
    >
    > Does that help?
    > --
    > Assigning guilt doesn't solve the problem
    >
    >
    > "slimla" wrote:
    >
    > > Actually,
    > >
    > > What I'm trying to achieve is selecting the Range from a Activecell to a
    > > specfic number.
    > >
    > > Since my Activecell is not constant, that why I have to first use the Find
    > > Function then select the cell 10 below plus 10 cells down and copy and paste
    > > it somewhere else.

    >


  7. #7
    Tom Ogilvy
    Guest

    Re: VBA code using Find to locate text and display the Cell Range.

    ActiveCell.Resize(10,10).copy would make a 10 x 10 range

    or perhaps for a single cell offset from the active cell
    ActiveCell.Offset(9,9)

    to demo from the immediate window:
    ? Range("A1").Offset(9,9).Address
    $J$10


    --
    Regards,
    Tom Ogilvy

    "slimla" <slimla@discussions.microsoft.com> wrote in message
    news:BB4BF4BF-E9F3-455B-B65D-83798235BA61@microsoft.com...
    > Actually,
    >
    > What I'm trying to achieve is selecting the Range from a Activecell to a
    > specfic number.
    >
    > Since my Activecell is not constant, that why I have to first use the Find
    > Function then select the cell 10 below plus 10 cells down and copy and

    paste
    > it somewhere else.
    >
    >
    >
    > "Mike Fogleman" wrote:
    >
    > > VB code does not have Columns and Rows, just lines.
    > > "slimla" <slimla@discussions.microsoft.com> wrote in message
    > > news:F4294A60-4A7C-498E-92D9-139786120C00@microsoft.com...
    > > > Hi is there a where a way to display the Column and Row Number on the

    vb
    > > > code?
    > > >
    > > > Thanks

    > >
    > >
    > >




+ 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