+ Reply to Thread
Results 1 to 21 of 21

Find common word and transpose 4 rows eachtime in activesheet range

  1. #1
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Find common word and transpose 4 rows eachtime in activesheet range

    How to edit the code to work in SHEET1 (Range A1 To A10000). FINE appears multiple times with in the Range A1 To A10000.

    Sub Macro1()


    Cells.Find(What:="FINE", After:=Range("A2"), LookIn:=xlFormulas, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
    False, SearchFormat:=False).Activate

    ActiveCell.Resize(3, 1).Select
    Selection.Copy

    ActiveCell.Offset(, 4).Select

    Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=True
    End Sub

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Find common word and transpose 4 rows eachtime in activesheet range

    Please Login or Register  to view this content.
    If you are happy with my response please click the * in the lower left of my post.

  3. #3
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: Find common word and transpose 4 rows eachtime in activesheet range

    The transpose i snot working.

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Find common word and transpose 4 rows eachtime in activesheet range

    The transpose i snot working.
    That is correct. I missed that part.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: Find common word and transpose 4 rows eachtime in activesheet range

    sir now nothing is happening.

  6. #6
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Find common word and transpose 4 rows eachtime in activesheet range

    Submit your workbook because it worked just fine for me when tested. Make sure to include a before and after on your submitted workbook.

  7. #7
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: Find common word and transpose 4 rows eachtime in activesheet range

    sir i want the vba to run in all sheets except sheeta and sheetb.

  8. #8
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: Find common word and transpose 4 rows eachtime in activesheet range

    I want to run the code in all sheets except sheetA and SheetB. and want the transposed data in B18 of each sheet.
    Last edited by sroysroy; 10-20-2015 at 03:22 AM.

  9. #9
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Find common word and transpose 4 rows eachtime in activesheet range

    @ sroysroy - Just provide a sample Before and After for one sheet, so we can be sure of what you're after. We can edit it for the entire workbook later.

  10. #10
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: Find common word and transpose 4 rows eachtime in activesheet range

    JOHN H. DAVIS Please find the attachment. I have two key words "FINE" and "SINE2" and output example starts from A18. VBA should not work on sheetA and SheetB. Thanks in advance. PS: Copy only 3 rows for VBA output.
    Attached Files Attached Files
    Last edited by sroysroy; 10-20-2015 at 12:06 PM.

  11. #11
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Find common word and transpose 4 rows eachtime in activesheet range

    Maybe:

    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: Find common word and transpose 4 rows eachtime in activesheet range

    Sir, I am not getting the FINE output as in the excel workbook i,e in B18:D18.
    And also not the SINE2 output in B20.
    Last edited by sroysroy; 10-20-2015 at 07:49 PM.

  13. #13
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Find common word and transpose 4 rows eachtime in activesheet range

    I thought you wanted it on the found row. Try.

    Please Login or Register  to view this content.

  14. #14
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: Find common word and transpose 4 rows eachtime in activesheet range

    SlNE2 code is not working ! and is about getting the merged output in a single cell i.e .Cells(20, "B"

  15. #15
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Find common word and transpose 4 rows eachtime in activesheet range

    Try:

    Please Login or Register  to view this content.
    Try formating your Column A to text.

  16. #16
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: Find common word and transpose 4 rows eachtime in activesheet range

    Thank you john h. Davis

  17. #17
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Find common word and transpose 4 rows eachtime in activesheet range

    You're welcome. Glad to help out and thanks for the feedback.

  18. #18
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: Find common word and transpose 4 rows eachtime in activesheet range

    if I want 100 rows for .Cells(z.row + 1, "A") ? can we give it a rangewith : ?
    Last edited by sroysroy; 10-22-2015 at 06:38 PM.

  19. #19
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: Find common word and transpose 4 rows eachtime in activesheet range

    How to give a range (if i have 100 rows then) here sir instead of

    Please Login or Register  to view this content.
    That appears in below code

    Please Login or Register  to view this content.

  20. #20
    Forum Contributor
    Join Date
    05-01-2013
    Location
    IND
    MS-Off Ver
    Excel 2007
    Posts
    130

    Re: Find common word and transpose 4 rows eachtime in activesheet range

    john h. Davis I sent you a PM.

  21. #21
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Find common word and transpose 4 rows eachtime in activesheet range

    Try:

    Please Login or Register  to view this content.
    Last edited by JOHN H. DAVIS; 10-23-2015 at 03:26 PM.

+ 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. [SOLVED] How to find repeated or most common numbers from rows?
    By sem in forum Excel General
    Replies: 20
    Last Post: 11-02-2014, 04:51 PM
  2. Find most common (x5) numbers within numerical string range
    By JEWB in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 04-03-2014, 06:59 AM
  3. Macro to transpose rows to columns and copy to Word
    By usb501 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-28-2013, 03:53 AM
  4. Replies: 3
    Last Post: 03-08-2013, 09:28 AM
  5. [SOLVED] Trying to find the most common word in a very large list
    By Flying_Dutchman in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 07-10-2012, 10:23 AM
  6. Find the lest common string-value in a range
    By ElmerS in forum Excel General
    Replies: 4
    Last Post: 02-01-2009, 06:25 PM
  7. [SOLVED] inserting rows at common word in a sheet
    By Ankur in forum Excel General
    Replies: 0
    Last Post: 08-10-2005, 07:05 AM

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