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: 25
Default Find the nearest point to 1000 rows where "amounts" balance and apply special formatting to that row

Hi,

I'm writing a macro to create a csv file from a spreadsheet that has to be
formatted in a certain way.

One rule for the csv I'm getting stuck on is as follows:

The speadsheet could contain say 20000 lines. The fields could be Journal
number, description, Amount.

As I extract each row, the code should find the nearest row to 1000 where
the amounts evaluate to zero (the amounts are pluses and minuses) at which
point I can apply specific fomating to that row in the csv extract then to
start the count again from 1 and find the next nearest row to 1000 and again
apply the specific formatting to that row in the csv extract.

I'm thinking that I could step through each row and add the amounts (amount
= amount + amount) but the problem is the formatting should occur at the
NEAREST point to 1000 rows as possible. How do I get the code to count back
from 1000 to find that point if when I'm adding the amounts I'm starting
from 1 and counting up.

Any advise appreciated

Paul


 
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
Conditional Formatting - find cells containg "+" Colin Hayes Excel Discussion (Misc queries) 3 March 19th 10 03:26 PM
Find formatting doesn't work: "Excel cannot find data" Kasama Excel Discussion (Misc queries) 1 August 18th 06 01:40 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
programmaticaly test more then 1000 excel files for "opening Errors" Robert[_28_] Excel Programming 2 December 23rd 04 10:49 PM


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