Consulting

Results 1 to 2 of 2

Thread: VBA export of cells with variable range

  1. #1

    VBA export of cells with variable range

    Hi,

    i am trying to find a way how to define a range of cells to export by some kind of search function.

    For example table looks like:
    1
    ...
    999
    a
    1500
    ...
    2300
    b
    I need to export just cells from 1-999, a is name of another things in column, so it could be used to separate it. The problem is that these number of cells, that need to be transferred are variable.

    I hope you could help with this problems.
    Thanks in advance

  2. #2
    Knowledge Base Approver VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,646
    [vba]
    Sub M_snb()
    With sheets(1).columns(1).find("a",,xlvalues,1)
    sheets(2).cells(1).resize(.row-1)= sheets(1).cells(1).resize(.row-1).value
    End with
    End Sub
    [/vba]

Posting Permissions

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