Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
capturing Data and printing line elsewhere
I am wanting to be able to take a row of data that ends with a date and based
on the date move that entire line to another sheet or to a specific location on my drive: for example A B C D 1] john Dee enter ga-01 06/05/2007 2] jane lane outer ga-02 07/10/2007 3] dan land enter ga-01 08/01/2007 4] Pea Body enter ga-01 07/26/2007 Now I want to capture the dates in column D that are after 07/01/2007 and list them in order on another page. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
capturing Data and printing line elsewhere
I'd apply data|filter|autofilter and use that to show the rows I wanted to see.
I wouldn't create another copy. But if you had to, you could copy the visible rows and paste into any other worksheet you wanted. d_kight wrote: I am wanting to be able to take a row of data that ends with a date and based on the date move that entire line to another sheet or to a specific location on my drive: for example A B C D 1] john Dee enter ga-01 06/05/2007 2] jane lane outer ga-02 07/10/2007 3] dan land enter ga-01 08/01/2007 4] Pea Body enter ga-01 07/26/2007 Now I want to capture the dates in column D that are after 07/01/2007 and list them in order on another page. -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
capturing Data and printing line elsewhere
Sub tester()
Dim SCell As String SCell = Range("D1") Set STest = Range("A4").Range("D1:D4") i = 1 j = 2 For Each Cell In STest If CDate(SCell) <= STest(i) Then Cell.EntireRow.Cut Destination:=Sheets("Sheet3").Cells(j, "A") j = j + 1 End If i = i + 1 Next Cell Sheets("Sheet3").Activate Range("A2").CurrentRegion.Sort Key1:=Range("D1"), Order1:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal End Sub Try this **ON A BACK UP COPY ** Write back if problems,,,, Jim May "d_kight" wrote: I am wanting to be able to take a row of data that ends with a date and based on the date move that entire line to another sheet or to a specific location on my drive: for example A B C D 1] john Dee enter ga-01 06/05/2007 2] jane lane outer ga-02 07/10/2007 3] dan land enter ga-01 08/01/2007 4] Pea Body enter ga-01 07/26/2007 Now I want to capture the dates in column D that are after 07/01/2007 and list them in order on another page. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
capturing Data and printing line elsewhere
THANKS JIM, I WILL GIVE THAT A GO AND LET YOU KNOW HOW IT TURNED OUT.
"Jim May" wrote: Sub tester() Dim SCell As String SCell = Range("D1") Set STest = Range("A4").Range("D1:D4") i = 1 j = 2 For Each Cell In STest If CDate(SCell) <= STest(i) Then Cell.EntireRow.Cut Destination:=Sheets("Sheet3").Cells(j, "A") j = j + 1 End If i = i + 1 Next Cell Sheets("Sheet3").Activate Range("A2").CurrentRegion.Sort Key1:=Range("D1"), Order1:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal End Sub Try this **ON A BACK UP COPY ** Write back if problems,,,, Jim May "d_kight" wrote: I am wanting to be able to take a row of data that ends with a date and based on the date move that entire line to another sheet or to a specific location on my drive: for example A B C D 1] john Dee enter ga-01 06/05/2007 2] jane lane outer ga-02 07/10/2007 3] dan land enter ga-01 08/01/2007 4] Pea Body enter ga-01 07/26/2007 Now I want to capture the dates in column D that are after 07/01/2007 and list them in order on another page. |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
capturing Data and printing line elsewhere
THNKS AGAIN, JIM BUT THERE SEEMS TO BE SOMETHING INCORRECT ABOUT THE CODE AT
THIS POINT CurrentRegion.Sort Key1:=Range("D1"), Order1:=xlAscending, I THINK USINF THE "|" SYMBOL IS NOT LIKE BY THE VB EDITOR. IS THERE ANOTHER WAY OR AM i SEEING THAT INCORRECTLY? AGAIN, THANKS FOR ANY HELP THAT COULD BE PROVIDED IN ADVANCED. (NOT YELLING, TRYING TO MAKE IT STAND OUT.) "Jim May" wrote: Sub tester() Dim SCell As String SCell = Range("D1") Set STest = Range("A4").Range("D1:D4") i = 1 j = 2 For Each Cell In STest If CDate(SCell) <= STest(i) Then Cell.EntireRow.Cut Destination:=Sheets("Sheet3").Cells(j, "A") j = j + 1 End If i = i + 1 Next Cell Sheets("Sheet3").Activate Range("A2").CurrentRegion.Sort Key1:=Range("D1"), Order1:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal End Sub Try this **ON A BACK UP COPY ** Write back if problems,,,, Jim May "d_kight" wrote: I am wanting to be able to take a row of data that ends with a date and based on the date move that entire line to another sheet or to a specific location on my drive: for example A B C D 1] john Dee enter ga-01 06/05/2007 2] jane lane outer ga-02 07/10/2007 3] dan land enter ga-01 08/01/2007 4] Pea Body enter ga-01 07/26/2007 Now I want to capture the dates in column D that are after 07/01/2007 and list them in order on another page. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Capturing Rows of Data | Excel Discussion (Misc queries) | |||
Capturing data using a formula | Excel Discussion (Misc queries) | |||
Web Query - Submitting Data and Capturing Result | Excel Discussion (Misc queries) | |||
Charts Line Types for Multiple Data Series not Printing Properly | Charts and Charting in Excel | |||
SUMPRODUCT CAPTURING DATA FROM ANOTHER SPREADSHEET | Excel Worksheet Functions |