View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Paige Paige is offline
external usenet poster
 
Posts: 270
Default Search and Move - Cannot Figure This Out - Please Help

My spreadsheet has 4 columns, for example:

Col A B C D
Description Type Charge Offering
Alert $35 SO
Alert SO
Alert 9113 SO
Perform $ 5 SO
Perform $12 SO
Perform 9220 SO
Alert $19 SCO
Alert 8332 SCO
AA i/p $23 SO
AA i/p SO

I need to:
1) Go through each row of Col D; if it says 'SCO', then go to next row of
Col D.
2) If it says 'SO', then
a) If Col C 0, add the value in Col C to any other value in Col C
(going down)
until both Col A and Col B are < blank, and put that sum in Col C
on the
same row where both Col A and Col B are < blank, then erase the
individual entries in Col C used to come to that sum.
If during this process you ever find that both Col A and B are
blank, then
stop and go to the next row in Col D, and start over to see if it
says 'SO'
or 'SCO'.
b) If Col C is blank or = 0, then go to the next row of Col D and
start over to
see if it says 'SO' or 'SCO'.

I've struggled with this for quite some time and am desperately hoping
someone can help. The final product, using the example above and afer the
macro has run, should look like this:

Col A B C D
Description Type Charge Offering
Alert SO
Alert SO
Alert 9113 $35 SO
Perform SO
Perform SO
Perform 9220 $17 SO
Alert $19 SCO
Alert 8332 SCO
AA i/p $23 SO
AA i/p SO