+ Reply to Thread
Results 1 to 7 of 7

Please Help With find function VBA

Hybrid View

vpnvipin Please Help With find... 05-11-2012, 03:20 AM
Paul Re: Please Help With find... 05-11-2012, 03:27 AM
vpnvipin Re: Please Help With find... 05-11-2012, 03:31 AM
vpnvipin Re: Please Help With find... 05-11-2012, 03:30 AM
tom1977 Re: Please Help With find... 05-11-2012, 03:32 AM
vpnvipin Re: Please Help With find... 05-11-2012, 03:36 AM
tom1977 Re: Please Help With find... 05-11-2012, 03:39 AM
  1. #1
    Registered User
    Join Date
    03-22-2012
    Location
    Bangalore, IND
    MS-Off Ver
    EXCEL 2010, 2007
    Posts
    90

    Please Help With find function VBA

    Hy all masterminds,


    I need a help to create a macro.
    first open the excel sheet from sheet 1 cell B5 copy the no(changeable) then find in Sheet 2(where it is) then copy from Sheet 1 B7 to B10 & then paste it to sheet 2 opp. of the no. (transpose)

    I am still bad at using find functions in snippet, please help , thanks for you and your time !!


    please find the attached file , its too simple and small one!

    Rof.xlsx
    Last edited by vpnvipin; 05-11-2012 at 03:36 AM.
    Vipin Oceans

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Please Help With find function VBA

    In your sample workbook, on sheet2, you have duplicate values in column C. How is Excel supposed to know which row to transpose the data into? Or is your sample data not an accurate representation of your real data?

  3. #3
    Registered User
    Join Date
    03-22-2012
    Location
    Bangalore, IND
    MS-Off Ver
    EXCEL 2010, 2007
    Posts
    90

    Re: Please Help With find function VBA

    Thank you paul to bring that to me into notice!!

  4. #4
    Registered User
    Join Date
    03-22-2012
    Location
    Bangalore, IND
    MS-Off Ver
    EXCEL 2010, 2007
    Posts
    90

    Re: Please Help With find function VBA

    if the value is repaeating in c column the same data which we are transposing should come just opposite to both the values

  5. #5
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Please Help With find function VBA

    Hi try this
    Sub aa()
    Dim f, f1 As Range
    Dim arr As Variant
    Dim x As Long
    Set f1 = Worksheets("sheet1").Range("b7:b10")
    f = Worksheets("sheet1").Range("b5").Value
    arr = Worksheets("sheet2").Range("c4:c23")
    For x = LBound(arr) To UBound(arr)
        If arr(x, 1) = f Then
            Worksheets("sheet2").Cells(x + 3, 5).Resize(, 4) = Application.Transpose(f1)
        End If
        Next
    End Sub
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  6. #6
    Registered User
    Join Date
    03-22-2012
    Location
    Bangalore, IND
    MS-Off Ver
    EXCEL 2010, 2007
    Posts
    90

    Re: Please Help With find function VBA

    Repp added dear tom !! thank u so much @!!

  7. #7
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Please Help With find function VBA

    Thx.
    Remember that this code works on this sample (You have to adjust this to original file - have fun )

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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