Hi,
Please provide the vba/Macro/Programme for Search, Find, Copy and Paste next 5 or 10 transaction as per attached sheet
Hi,
Please provide the vba/Macro/Programme for Search, Find, Copy and Paste next 5 or 10 transaction as per attached sheet
Don't know what you are asking for, can you be more specific?
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
As a beginner starter :
PHP Code:
Sub Demo1()
Dim Rg As Range, A$, C%
With ActiveSheet.UsedRange.Columns(2)
Set Rg = .Find(92000, , xlValues, xlWhole)
If Not Rg Is Nothing Then
A = Rg.Address
Application.ScreenUpdating = False
C = 5
Do
C = C + 1
Cells(C).Value2 = "#" & Rg.Row
Rg(2).Resize(5).Copy Cells(2, C)
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 » !
Thanks bro,
its working great
sorry for my late reply.
Thank you very much
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks