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: 407
Default Need help with a Macro Procedure

I was wondering if anyone could help me with creating a macro procedure to
do the following, which is a pain to do manually, and needs to be redone
every time anyone changes anything in my spreadsheet, which if often! I
think I've learned enough so that I can troubleshoot the code, should there
be any problem, if someone can supply it to me. By the way, the columns are
really, AU, BH, and AV but I thought it would be easier to ask for A, C, and
B below, and edit that myself. Please let me know if I have left anything
out.



From rows 82 to 164, inclusive, I want to check Column A, one row at a time
(each row is one month later). If the entry is <= 10,000, then there is
nothing needed, so I want the cursor to simply move down to the next entry
in that column. If, in the Jth row, the entry is 10,000, then it needs to
do a test. It needs to look forward to the next row in this same column A
where there is another entry greater than 10,000 - let's call it the Kth row
(K <= 165, at some point, there will be no such 'future' value greater than
10,000, so then set K = 165). If the sum of entries in another column,
column C, from row 82 until (and including) this 'future' row K is zero,
then, once again, no action is required and we should just move down one row
(to J+1) in column A.



However, if the above test fails to produce zero, then I want to slide the
cursor sideways over to the Jth row of column B and enter the value 10, then
repeatedly increment by 10 more, until the second condition above is met.
Occasionally, before this condition is met, another increment of 10 causes
the entry in row J of column C to exceed 999,999. If so, then I want to
back off to the prior increment of 10 and end the procedure for the Jth row.



Then, go back to column A and continue with the J+1st row, ending at row
164.



Thanks so much!

Dean




 
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
Runs in macro but not in procedure...why? Billy B Excel Programming 1 June 20th 06 05:30 AM
Use Procedure Instead of Macro WStoreyII Excel Programming 0 August 5th 04 02:45 AM
Calling a .Net Procedure from a Macro Scott Eguires Excel Programming 0 December 10th 03 10:35 PM
Rum macro in procedure SpeeD[_2_] Excel Programming 4 August 8th 03 12:21 AM


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