PDA

View Full Version : Deleting headers between two found variables?



sindhuja
05-05-2008, 09:51 PM
EDIT: New thread created from post #37 in this thread (http://vbaexpress.com/forum/showthread.php?t=18716&page=2) for clarity! Simon Lloyd

Here is the steps...

rTot = .Find(What:="PAID & WAIT TOTAL"

1) Find for the "PAID & WAIT TOTAL" and save the value in rTot.

2) Save the address of rTot in a variable say “X”

rTot = .FindNext(rTot)

3) Again save the address of rTot in another variable say “Y” if rTot.Offset (, 1) > 1

4) Now we need to delete all the text in between the cells
(variables X and Y)

5) After deleting the text, again re-assigning the value of X to be the value of Y and find for the next PAID & WAIT TOTAL and if rTot.Offset (, 1) > 1, the address of this cell should be stored in the variable Y and similarly we have to delete all text values between the both the cell values.

This continues till last PAID & WAIT TOTAL.

Hope this will helps out !

-Sindhuja

sindhuja
05-06-2008, 04:10 PM
Hi,

Only the below entered header needs to be deleted between the address of variables "X" and"Y".


PLACE DT TRADE CLIENT/ ACCOUNT #/ TRAN SHARES TOTAL UNDER COMM/CN/FFEE NAV DIV
PAYMT DT DATE DEALER ORDER # TRACE ID CODE NAV PRICE AMOUNT WRITER STL TYPE AMOUNT ON
-------- -------- ------ -------- ----------- ----- ------------- ------------- ----------- ----------- ------------- ------------

-Sindhuja

Simon Lloyd
05-07-2008, 01:18 AM
Attachment from previous thread.

sindhuja
05-10-2008, 05:58 AM
Hi All,

Any idea on this...?

-Sindhuja