+ Reply to Thread
Results 1 to 2 of 2

Assign Range into Arrray and then use array to find text to make new range and seach word

Hybrid View

  1. #1
    Registered User
    Join Date
    05-18-2016
    Location
    india
    MS-Off Ver
    2007
    Posts
    34

    Assign Range into Arrray and then use array to find text to make new range and seach word

    Hi Guys,

    Thanks in advance.

    I need a code in below sequence.

    1) Assign a Dynamic range in "Proposal Data" worksheet to array.

    2) using array, find from array value from "Spec Landing" Worksheet and also find text "Stocks and Inks" below that array vale cell to form new range. now from this new range find "Comment: " Text

    3) All the Text after "Comments: " should be copy and paste in worksheet "Proposal Data" Column X again that particular Array


    Note :- in Worksheet "Spec Landing" data is saved in Unicode Text in A:A column.

    Untitled.png

    Untitled1.png


    i used the below code but failed.

    Dim Rng As Range, rRange As Range
    Worksheets("Proposal Data").Active
    Dim Ram As Worksheet
    Dim Sham As Worksheet
    Dim LastRow As Integer
    Dim vArray As Variant
    'Dim WArray As Variant
    Dim i As Long

    Set Ram = Worksheets("Proposal Data")
    Set Sham = Worksheets("Spec Landing")

    LastRow = Ram.Cells(Rows.Count, "Q").End(xlUp).Row
    vArray = Ram.Range("Q5:A" & LastRow)

    For i = LBound(vArray) To UBound(vArray)

    FirstRow = sht.Range("A:A").Find(vArray(i), SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    LastRow = sht.Range("A:A").Find(" Stocks and Inks ", After:=FirstRow, SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    xan = sht.Range(FirstRow & LastRow).Select

    With xan
    Tan = Range(xan).Find(What:="Comments:", After:=FirstRow, SearchOrder:=xlByRows, SearchDirection:=xlPrevious)
    '
    If Not Tan Is Nothing Then
    End If
    End With
    Next

    End Sub

  2. #2
    Registered User
    Join Date
    05-18-2016
    Location
    india
    MS-Off Ver
    2007
    Posts
    34

    Re: Assign Range into Arrray and then use array to find text to make new range and seach w

    its very urgent. Hope someone can help me?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Find word within text that matches range and Vlookup the result
    By snakeCZ in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-19-2015, 04:28 AM
  2. find word starts with specific text in range
    By linok in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-19-2014, 02:15 AM
  3. [SOLVED] ARRAY Formula: Seach Range and list row information of Non-Blanks
    By JasonNeedsHelp in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-24-2014, 09:37 AM
  4. [SOLVED] Add Range to Array find Array value and Paste back to Range
    By Foreverlearning in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 04-28-2012, 05:45 PM
  5. Assign range to array
    By Deutz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-06-2012, 07:14 PM
  6. Replies: 2
    Last Post: 06-29-2006, 02:00 AM
  7. Make an array from text and sheet range
    By mikewild2000 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-17-2005, 01:45 PM

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