Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, Omer:
Thanks for your help! What I need is an automatic process. I do not like to do it manually. The only thing I would like to see is whenever I input 0 or 1 under column A on sheet 1, all rows with input 1 will go to sheet 2 IN THE SAME ORDER. I would appricate your efforts if you have an alternative to achieve this. George Ömer Ayzan wrote: Hi George If I were you I would have filtered the rows that contain 1 and copy the filtered range and paste it to the second sheet. The follovin code might do the job: Sub Test dim rngCur as range ' Current range Sheets("Sheet 1").activate ' assuming that you have data starting from A1 Range("A1").AutoFilter Field:=1, Criteria1:="1", Operator:=xlAnd Set rngCur= range("A1").CurrentRegion rngCur.Copy Sheets("Sheet 2").activate range("A1").Select Selection.PasteSpecial Paste:= xlPasteAll end sub Ömer Ayzan "George" wrote in message oups.com... Dear All: I have a excel workbook which contains two worksheets. Sheet 1 is my input page. Sheet 2 is my summary page. When my BINARY input numbers in any row under column A which is under sheet 1 are equal to 1, I would like the whole row to be copied to sheet 2. When my input numbers in any row under column A which is under sheet 1 are equal to 0, the whole row will NOT be copied to sheet 2. However, I don't like any gaps in sheet 2 AND I would like to keep the same order in sheet 2 as in sheet 1. In addition, I would like this to be done in an automatic procedure. No autofilter or any other manual efforts. The following is an illustration of what I would like to see: Under sheet 1 Column A ColumnB Column C ...... row1 1 Text1 1 row2 0 Text2 2 row3 0 Text3 3 row4 1 Text4 4 Since there are inputs in cell A1 and A2, the whole row 1 and row 2 will be copied AUTOMATICALLY to sheet 2 in the same order WITHOUT any gap as follows: Under sheet 2 ColumnA Column B Column C row1 1 Text1 1 row2 1 Text4 4 Anybody knows how to achieve this? It is my headache. I really appreciate your help! Thank you so much and I am looking forward to hearing from you soon! George |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Populate Data from Summary Sheet | Excel Discussion (Misc queries) | |||
How to Populate a summary page from the input page??????????????????????? | Excel Programming | |||
Summary Page | Excel Programming | |||
I want to conditionally auto-populate a summary worksheet | Excel Discussion (Misc queries) | |||
Summary on one page | Excel Programming |