Consulting

Results 1 to 4 of 4

Thread: Deleting headers between two found variables?

  1. #1
    VBAX Mentor
    Joined
    Sep 2007
    Posts
    405
    Location

    Smile

    EDIT: New thread created from post #37 in this thread 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

  2. #2
    VBAX Mentor
    Joined
    Sep 2007
    Posts
    405
    Location
    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

  3. #3
    Site Admin VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,005
    Location

    Attachment from previous thread added!

    Attachment from previous thread.
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  4. #4
    VBAX Mentor
    Joined
    Sep 2007
    Posts
    405
    Location
    Hi All,

    Any idea on this...?

    -Sindhuja

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •