+ Reply to Thread
Results 1 to 5 of 5

Search, Find, Copy and Paste next 5 or 10 transaction

  1. #1
    Forum Contributor
    Join Date
    10-30-2019
    Location
    Agra
    MS-Off Ver
    Office 2010
    Posts
    241

    Search, Find, Copy and Paste next 5 or 10 transaction

    Hi,

    Please provide the vba/Macro/Programme for Search, Find, Copy and Paste next 5 or 10 transaction as per attached sheet

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Search, Find, Copy and Paste next 5 or 10 transaction

    Don't know what you are asking for, can you be more specific?

  3. #3
    Forum Contributor
    Join Date
    10-30-2019
    Location
    Agra
    MS-Off Ver
    Office 2010
    Posts
    241

    Re: Search, Find, Copy and Paste next 5 or 10 transaction

    It’s a sample data, we have more then 200 values in column B and there are many values equal to 92000

    Process is
    Need the process - in column B, searching 92000 and when we find it, we will copy the data from next 5 cells (marked as green) and start paste it on F, when we find another data we will paste on G

    We have done the following things in this sheet
    1- In column B, we have find 92000 in B3 and copy the data B4:B8 (Total 5 cell data) and paste it on F

    2- we have again start the search In column B after finding first amount 92000 and we have find 92000 in B10 and copy the data B11:B15 (Total 5 cell data) and paste it on G

    3 we will start the search again in column B after finding second amount 92000 and when we find, we will copy next 5 cells data (Total 5 cell data) and paste it on H

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Hi ! Try this …


    As a beginner starter :

    PHP Code: 
    Sub Demo1()
               
    Dim Rg As RangeA$, C%
        
    With ActiveSheet.UsedRange.Columns(2)
               
    Set Rg = .Find(92000, , xlValuesxlWhole)
            If 
    Not Rg Is Nothing Then
               A 
    Rg.Address
                     Application
    .ScreenUpdating False
                     C 
    5
                
    Do
                     
    1
                     Cells
    (C).Value2 "#" Rg.Row
                     Rg
    (2).Resize(5).Copy Cells(2C)
                       
    Set Rg = .FindNext(Rg)
                
    Loop Until Rg.Address A
                       Set Rg 
    Nothing
                     Application
    .ScreenUpdating True
            End 
    If
        
    End With
    End Sub 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !

  5. #5
    Forum Contributor
    Join Date
    10-30-2019
    Location
    Agra
    MS-Off Ver
    Office 2010
    Posts
    241

    Re: Hi ! Try this …

    Thanks bro,

    its working great

    sorry for my late reply.

    Thank you very much

+ 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. Where to start? Search pivot, find value, validate, copy/paste
    By rsamedic in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2017, 04:06 PM
  2. How to run Macro's so it will copy, search, find, and paste into new cell using 2 wrksheet
    By Harry_Sangha in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2014, 09:39 AM
  3. Search, find, copy and paste macro or code.
    By andrew0789 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-10-2014, 03:01 AM
  4. Search Item, Find, then Copy Paste Entire Row
    By kjbcox15 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-24-2013, 12:41 PM
  5. [SOLVED] VB Contact Search (Find, Copy and paste) Excel 2007
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-08-2013, 02:11 PM
  6. Search Find Copy Paste
    By cloud36 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-02-2011, 05:32 PM
  7. Search, Find, Copy, Paste
    By cloud36 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-01-2011, 03:53 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