Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Friends, how I can copy specific a specific row range in other sheets with
conditions special. ie: copy from: Sheet1: A B C D 1 W 100 200 300 2 400 500 600 3 700 800 900 4 W 1000 1100 1200 5 1300 1400 1500 .... (I not know how many rows there) to Sheet2 (ONLY range Ax to Dx when Ax = "W") A B C D 1 W 100 200 300 2 W 1000 1100 1200 .... Thanks, Iván |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The easiest is to sort by Wcopy. Record a macro if done often
-- Don Guillett SalesAid Software "Iván" wrote in message ... Friends, how I can copy specific a specific row range in other sheets with conditions special. ie: copy from: Sheet1: A B C D 1 W 100 200 300 2 400 500 600 3 700 800 900 4 W 1000 1100 1200 5 1300 1400 1500 .... (I not know how many rows there) to Sheet2 (ONLY range Ax to Dx when Ax = "W") A B C D 1 W 100 200 300 2 W 1000 1100 1200 .... Thanks, Iván |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Sub SpecialCopy() Sheets("Sheet2").Select Range("A1").Select Sheets("Sheet1").Select Range("B1").Select Do Until ActiveCell = "" If ActiveCell.Offset(0, -1).Value = "W" Then ActiveCell.EntireRow.Copy Sheets("Sheet2").Select ActiveCell.PasteSpecial ActiveCell.Offset(1, 0).Select Sheets("Sheet1").Select End If ActiveCell.Offset(1, 0).Select Loop End Sub This should work, Jorda -- jordanct ----------------------------------------------------------------------- jordanctc's Profile: http://www.excelforum.com/member.php...nfo&userid=676 View this thread: http://www.excelforum.com/showthread.php?threadid=27833 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
worksheets("Sheets1").Columns(1).SpecialCells(xlCo nstants) _
.EntireRow.copy _ Destination:=Worksheets("Sheet2").Range("A1") -- Regards, Tom Ogilvy "Iván" wrote in message ... Friends, how I can copy specific a specific row range in other sheets with conditions special. ie: copy from: Sheet1: A B C D 1 W 100 200 300 2 400 500 600 3 700 800 900 4 W 1000 1100 1200 5 1300 1400 1500 .... (I not know how many rows there) to Sheet2 (ONLY range Ax to Dx when Ax = "W") A B C D 1 W 100 200 300 2 W 1000 1100 1200 .... Thanks, Iván |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jordan, thanks...., this solution is ok. in normal ranges, but I forget
to write that "W" lines are rows from a subtotal process.... In this case the formula don't work. What do you think, this row is not real? Thanks, Ivan "jordanctc" wrote: Sub SpecialCopy() Sheets("Sheet2").Select Range("A1").Select Sheets("Sheet1").Select Range("B1").Select Do Until ActiveCell = "" If ActiveCell.Offset(0, -1).Value = "W" Then ActiveCell.EntireRow.Copy Sheets("Sheet2").Select ActiveCell.PasteSpecial ActiveCell.Offset(1, 0).Select Sheets("Sheet1").Select End If ActiveCell.Offset(1, 0).Select Loop End Sub This should work, Jordan -- jordanctc ------------------------------------------------------------------------ jordanctc's Profile: http://www.excelforum.com/member.php...fo&userid=6761 View this thread: http://www.excelforum.com/showthread...hreadid=278331 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Selection copy and insert to other sheet (Macro) | Excel Discussion (Misc queries) | |||
Help creating a macro to copy and paste a certain selection | Excel Discussion (Misc queries) | |||
Help creating a macro to copy and paste a certain selection | Excel Discussion (Misc queries) | |||
Need a macro to Copy a selection and paste into a new email. | Excel Discussion (Misc queries) | |||
Macro to Copy Selection to new Sheets | Excel Programming |