Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() (1) I have recorded a macro that cleans up exported reports & puts it into a format that I need. The final result of this macro is a worksheet that all the data that I need including $ amounts is formatted correctly & a preceding column that indicates if the $ amount is over a predefined amount. What I need is a macro that will look at the "under/over" column & Cut & Pastes all the "over" $ amounts data into another worksheet. So in the end, I have an "Under" & an "Over" worksheet where the $ amounts & corressponding data are seperated by the predefined $ limit. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
z = 1
Do x = x + 1 Loop Until Worksheets(1).Cells(1, 1) = "" For y = 1 To x If Worksheets(1).Cells(y, undOvr).Value = "Over" Then Worksheets(1).Rows(y).Cut Worksheets(2).Rows(z).Insert z = z + 1 End If Next y -----Original Message----- (1) I have recorded a macro that cleans up exported reports & puts it into a format that I need. The final result of this macro is a worksheet that all the data that I need including $ amounts is formatted correctly & a preceding column that indicates if the $ amount is over a predefined amount. What I need is a macro that will look at the "under/over" column & Cut & Pastes all the "over" $ amounts data into another worksheet. So in the end, I have an "Under" & an "Over" worksheet where the $ amounts & corressponding data are seperated by the predefined $ limit. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Change B4 to the upper left corner of your data. Change 2 to indicate the
relative column in your data that contains the over under values (assumes it is text "over") Sub AATester6() Dim rng As Range ActiveSheet.AutoFilterMode = False Range("B4").AutoFilter Field:=2, Criteria1:="over" Set rng = ActiveSheet.AutoFilter.Range rng.Copy Destination:= _ Worksheets("Over").Range("A1") Set rng = rng.Offset(1, 0).Resize(rng.Rows.Count - 1) rng.SpecialCells(xlCellTypeVisible).EntireRow.Dele te rng.AutoFilter End Sub -- Regards, Tom Ogilvy hailnorm wrote in message ... (1) I have recorded a macro that cleans up exported reports & puts it into a format that I need. The final result of this macro is a worksheet that all the data that I need including $ amounts is formatted correctly & a preceding column that indicates if the $ amount is over a predefined amount. What I need is a macro that will look at the "under/over" column & Cut & Pastes all the "over" $ amounts data into another worksheet. So in the end, I have an "Under" & an "Over" worksheet where the $ amounts & corressponding data are seperated by the predefined $ limit. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
cell refrence based on specific criteria | Excel Discussion (Misc queries) | |||
Paste data based on multiple criteria | Excel Worksheet Functions | |||
Copy data to another wb based on specific criteria | Excel Discussion (Misc queries) | |||
Transferring data from one worksheet to another based on criteria | Excel Discussion (Misc queries) | |||
Copying data from one worksheet to another based on criteria | Excel Discussion (Misc queries) |