LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default copy rows based on conditions and insert them into another sheet...

Here's a new one...

I have an accounting workbook with some hidden sheets based on months.
All month sheets have a Fixed heading with some accounting information
below it and further down the sheet, a Unpaid From Last Month heading
with some information. What I need is that if there are lines under
the Fixed heading that have negative balances, I want that entire row
inserted under the Unpaid From Last Month.

For example...

within the "November" worksheet...

A B C
D ... L
9 Fixed
10 Bill Frequency
Amount Yet To Pay
11 ( blank
cells )
12 Account
1
(4100.00)
13 Account
2
3300.00
14 Account
3
(4333.00)
15
16
17
18
19
20
21
22
23 Unpaid From Last Month
24 ( blank
cells )
25



On "December"...

Rows 12 and 14 should be copied from "November" and placed in
"December" under Unpaid From Last Month.

The problem I'm having is that for "December" 'Unpaid From Last Month'
might start on row 21 or 20. And for any given month, there might be
a lot more accounts than accoutn 1, 2, or 3.

So basically, the user clicks a button to create a new month sheet
will be placed at the very end. I need the macro to access the
previous sheet (which should be the previous month), search the rows
only under the "Fixed" heading (which could be any number of rows) and
find a negative number in column L. If there is a negative number,
copy that entire row and place it on the new sheet under the heading
"Unpaid From Last Month".

I'm envisioning loops, but I'm still very new to Excel VBA. Any help
would be greatly appreciated.
 
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
copy rows from one Data sheet to another sheet based on cell conte John McKeon Excel Discussion (Misc queries) 2 May 15th 10 06:49 AM
Need Macro- Insert rows based on dates and copy info from that row Katerinia Excel Discussion (Misc queries) 1 April 6th 10 08:02 PM
Search for rows in one sheet and copy into another sheet based on customer id [email protected] Excel Worksheet Functions 1 October 22nd 07 03:09 AM
Help: auto-copy entire rows from 1 sheet (based on cell criteria) to another sheet. bertbarndoor Excel Programming 4 October 5th 07 04:00 PM
copy cells in two columns if in bold to another sheet and insert rows [email protected][_2_] Excel Programming 4 June 12th 07 06:01 PM


All times are GMT +1. The time now is 04:34 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"