Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i have a wbook with 2 sheets.
sheet1 and sheet2. in every sheets are many data. the range of column A3 : P30000 is the same range for every sheets. my problem is: Make a vlookup in sheet1 A3:A30000 from sheet2 A3:A30000, if the value is finded in this range cut the relative line, and copy the entire line in the shett3 start the copy of lines from A3, rearrange the sheet... with no blank line --- Message posted from http://www.ExcelForum.com/ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try this sal21
Code: -------------------- Dim i, count as long Sub YourMacro() count=3 For i=3 to 3000 If Sheets("sheet1").cells(i,1).value=Sheets("sheet2") .cells(i,1).value then Sheets("sheet1").Select Rows(i & ":" & i).select Selection.Copy Sheets("Sheet3").Select Rows(count & ":" & count).Select ActiveSheet.Paste count=count+1 End if Next End Sub -------------------- It will work. good luck --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
rick_deacha wrote:
try this sal21 Code ------------------- Dim i, count as long Sub YourMacro() count=3 For i=3 to 3000 If Sheets("sheet1").cells(i,1).value=Sheets("sheet2") .cells(i,1).value And Sheets("sheet1").cells(i,1).value < "" then Sheets("sheet1").Select Rows(i & ":" & i).select Selection.Copy Sheets("Sheet3").Select Rows(count & ":" & count).Select ActiveSheet.Paste count=count+1 End if Next End Sub ------------------- It will work. good luck HOW! it work fine. But for this macro my idea is to delete the cute line... and reaarrange the relative sheet with no blank lines... i possible -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy Cell From Subtotal Line To Detail Line | Excel Discussion (Misc queries) | |||
Line copy - Not just a simple copy paste | Excel Worksheet Functions | |||
Copy line if | Excel Worksheet Functions | |||
how to copy a whole line according to one cell in the line to a di | Excel Worksheet Functions | |||
copy to every second line | Excel Discussion (Misc queries) |