Copy Specific rows and paste it into another workbook

satya12

Board Regular
Joined
Oct 19, 2021
Messages
70
Office Version
  1. 2016
Platform
  1. Windows
Hi All,

i Want suggestions for this , i am having 2 workbooks one is excel another one is macro, we have to take the data from excel , filter it in the macro file. after filtered data if condition is met (specific text contains one row), we have to copy some specific data in the row. what my problem is after filtering the data that display 2 or 3 rows for that filter , if condition check the rows if sentence condition is met copy specific rows , not all row values only preferred rows data only we have to paste the excel .
i tried this code but its not getting

d = Worksheets("Template").Range("G" & Rows.Count).End(xlUp).Row
Dim Text As String
Text = Workbooks("Output file.xlsm").Sheets("Sheet2").Range("B" & i).Value
If Text < 100 Then
If InStr(Range("G").Value, "<100") > 0 Then
Range("D" & ",E").Copy

ActiveSheet.Rows(i).Select
Rows(i).Activate
Worksheets("Template").Rows(i).Copy
Sheets("Sheet2").ActiveSheet.Range("D2:F1000000").PasteSpecial Paste:=xlPasteAll
Application.CutCopyMode = False


End If


End If
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,212,933
Messages
6,110,757
Members
448,295
Latest member
Uzair Tahir Khan

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