Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Cut & Paste Data into different worksheet based on specific criteria


(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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Cut & Paste Data into different worksheet based on specific criteria

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Cut & Paste Data into different worksheet based on specific criteria

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
cell refrence based on specific criteria Jenn Excel Discussion (Misc queries) 3 September 22nd 08 08:54 PM
Paste data based on multiple criteria Tacrier Excel Worksheet Functions 0 April 11th 08 05:18 PM
Copy data to another wb based on specific criteria ksh Excel Discussion (Misc queries) 1 October 29th 07 01:30 PM
Transferring data from one worksheet to another based on criteria dread Excel Discussion (Misc queries) 5 July 28th 06 07:37 PM
Copying data from one worksheet to another based on criteria Caatt Excel Discussion (Misc queries) 1 June 15th 06 10:19 AM


All times are GMT +1. The time now is 09:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"