copy and paste - vba

itaye

New Member
Joined
Mar 20, 2018
Messages
2
heyy
please help

i have a table with 4 columns. the first column is the name and the other, info than belongs to the firs column .
i have try to make a macro for this but its not possible becouse the name dosnt appear in the same row. exp: Itay (my name) appear sometimes in row 3/6/7/12, but in a diffrent day its appear in row 1/2/3/4

what i need:
1.search the name
2. copy the name and the next columns
3. past in a differnt sheet

i need it with a macro (vba)

thanks
 
Last edited by a moderator:

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Do this within the macro-recorder first.
Then paste that code here so that one of the excel experts may have a starting point to help you.
 
Upvote 0
hey
thanks!


Sub ITAY()
'
' ITAY Macro
'


'
ActiveSheet.Range("$A$1:$A$27").AutoFilter Field:=1, Criteria1:="=*ITAY*", _
Operator:=xlAnd
Range("A2:D18").Select
Selection.Copy
Sheets("ITAY").Select
ActiveWindow.SmallScroll Down:=-3
Range("A1").Select
ActiveSheet.PASTE
Sheets("allcm").Select
Range("D33").Select
Application.CutCopyMode = False
End Sub
 
Upvote 0

Forum statistics

Threads
1,216,030
Messages
6,128,408
Members
449,448
Latest member
Andrew Slatter

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top