LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Lou Lou is offline
external usenet poster
 
Posts: 5
Default Macro Loop, Find, and Total

We have a worksheet that can have a varying number of rows.

A B C D E F G H I

1 vvv vvv vvv 23
2 a vvv vvv 34
3 b vvv vvv 34
4 vvv vvv vvv 55
5 a vvv vvv 11
..
..
53 Sub-total 123 444 456 676 333 323
54
55 Gr ttl 2,355

The "vvv's" are variable alphanumberic entries.

We are trying to write a macro that will loop through the
worksheet and pick up a running total of the numbers in
columns D though I for those rows that have either an "a"
or a "b" in column A.

We want to insert a new row under the "Sub-total" row,
name it "CASCA", and enter the running totals by column as
a negative number.
Then we would insert a new "Total" row after that and
enter the sum of the sub-total row and the CASCA row.

A B C D E F G H I

1 vvv vvv vvv 23
2 a vvv vvv 34
3 b vvv vvv 34
4 vvv vvv vvv 55
5 a vvv vvv 11
..
..
53 Sub-total 123 444 456 676 333 323
54 CASCA (68) (11)
55 Total 123 376 456 676 322 323
56
57 Gr ttl 2,276

 
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
Loop or Find code ?? need help !! EBnLP01 Excel Worksheet Functions 4 October 29th 09 05:47 PM
Find loop doesn't loop JSnow Excel Discussion (Misc queries) 2 June 24th 09 08:28 PM
Find & loop in VBA Noemi Excel Discussion (Misc queries) 3 January 25th 06 03:39 AM
Find loop Jamie[_8_] Excel Programming 2 April 22nd 04 10:00 PM
Find value loop not working Christiane[_6_] Excel Programming 3 April 6th 04 01:53 AM


All times are GMT +1. The time now is 08:21 AM.

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"