Posts by amruta0411

    If you want keep green text


    Sorry, doesn't seem to do anything. :(


    Thanks for trying, appreciate that.

    That's rather confusing. Could you possibly attach a workbook showing 'before' and 'after' please?


    Hi Stephen,


    Sorry about the confusion.


    The outcome needs to be this: [TABLE="border: 0, cellpadding: 0, cellspacing: 0"]

    [tr]


    [TD="width: 72, align: right"]435454[/TD]
    [TD="width: 72"]UV[/TD]
    [TD="width: 72, align: right"]5[/TD]
    [TD="width: 72"]A[/TD]
    [TD="width: 72"]DHFL[/TD]

    [/tr]


    [tr]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td]

    LMOP

    [/td]


    [/tr]


    [tr]


    [td][/td]


    [td][/td]


    [td][/td]


    [td]

    D

    [/td]


    [td]

    ACEG

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]46546[/TD]

    [td]

    YZ

    [/td]


    [TD="align: right"]5[/TD]

    [td]

    K

    [/td]


    [td]

    ACEG

    [/td]


    [/tr]


    [tr]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td]

    DHFL

    [/td]


    [/tr]


    [/TABLE]

    Hi guys,


    I have my data in the following format and I want to keep the rows in green, so delete all rows where the value in column 1 of the following row is not blank. [TABLE="border: 0, cellpadding: 0, cellspacing: 0"]

    [tr]


    [TD="width: 155, align: right"]212345[/TD]
    [TD="width: 259"]AB[/TD]
    [TD="width: 15"]6[/TD]
    [TD="width: 19"] [/TD]
    [TD="width: 250"] [/TD]

    [/tr]


    [tr]


    [TD="align: right"]231354[/TD]

    [td]

    CD

    [/td]


    [td]

    5

    [/td]


    [td]

    A

    [/td]


    [td]

    ACEG

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]64685[/TD]

    [td]

    EF

    [/td]


    [td]

    6

    [/td]


    [td][/td]


    [td][/td]


    [/tr]


    [tr]


    [TD="align: right"]465321[/TD]

    [td]

    GH

    [/td]


    [td]

    5

    [/td]


    [td]

    G

    [/td]


    [td]

    DHFL

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]546746853[/TD]

    [td]

    IJ

    [/td]


    [td]

    5

    [/td]


    [td]

    K

    [/td]


    [td]

    ACEG

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]465464[/TD]

    [td]

    KL

    [/td]


    [td]

    6

    [/td]


    [td][/td]


    [td][/td]


    [/tr]


    [tr]


    [TD="align: right"]54645[/TD]

    [td]

    MN

    [/td]


    [td]

    6

    [/td]


    [td][/td]


    [td][/td]


    [/tr]


    [tr]


    [TD="align: right"]446843541[/TD]

    [td]

    OP

    [/td]


    [td]

    5

    [/td]


    [td]

    A

    [/td]


    [td]

    ACEG

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]584683[/TD]

    [td]

    QR

    [/td]


    [td]

    6

    [/td]


    [td][/td]


    [td][/td]


    [/tr]


    [tr]


    [TD="align: right"]54654354[/TD]

    [td]

    ST

    [/td]


    [td]

    5

    [/td]


    [td]

    F

    [/td]


    [td]

    DHFL

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]435454[/TD]

    [td]

    UV

    [/td]


    [td]

    5

    [/td]


    [td]

    A

    [/td]


    [td]

    DHFL

    [/td]


    [/tr]


    [tr]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td]

    LMOP

    [/td]


    [/tr]


    [tr]


    [td][/td]


    [td][/td]


    [td][/td]


    [td]

    D

    [/td]


    [td]

    ACEG

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]5485435[/TD]

    [td]

    WX

    [/td]


    [td]

    5

    [/td]


    [td]

    D

    [/td]


    [td]

    DHFL

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]46546[/TD]

    [td]

    YZ

    [/td]


    [td]

    5

    [/td]


    [td]

    K

    [/td]


    [td]

    ACEG

    [/td]


    [/tr]


    [tr]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td]

    DHFL

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]346543[/TD]

    [td]

    AC

    [/td]


    [td]

    5

    [/td]


    [td]

    F

    [/td]


    [td]

    DHFL

    [/td]


    [/tr]


    [/TABLE]
    This is the code I have but it doesn't seem to be doing what I want, appreciate if someone could tell me what I am doing wrong:



    Thanks in advance!!
    Amruta

    i am sorri little mistake this has test and work for me


    This works perfectly! Thanks a lot!

    Hi,
    I am quite new to VBA, so not quite sure if I have worded the question correctly. Basically, I have data that comes from a text file and gets pasted across multiple rows and columns and I want to make a table with one row and one column.


    So, I want to convert this: [TABLE="border: 0, cellpadding: 0, cellspacing: 0"]

    [tr]


    [TD="width: 72"]ABC[/TD]
    [TD="width: 72, align: right"]1[/TD]
    [TD="width: 72, align: right"]2[/TD]
    [TD="width: 72, align: right"]3[/TD]
    [TD="width: 72, align: right"]4[/TD]

    [/tr]


    [tr]


    [td][/td]


    [TD="align: right"]5[/TD]
    [TD="align: right"]6[/TD]
    [TD="align: right"]7[/TD]
    [TD="align: right"]8[/TD]

    [/tr]


    [tr]


    [td][/td]


    [TD="align: right"]9[/TD]
    [TD="align: right"]10[/TD]

    [td][/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    DEF

    [/td]


    [TD="align: right"]1[/TD]
    [TD="align: right"]2[/TD]
    [TD="align: right"]3[/TD]

    [td][/td]


    [/tr]


    [tr]


    [td]

    GHI

    [/td]


    [TD="align: right"]1[/TD]
    [TD="align: right"]2[/TD]
    [TD="align: right"]3[/TD]
    [TD="align: right"]4[/TD]

    [/tr]


    [tr]


    [td][/td]


    [TD="align: right"]5[/TD]
    [TD="align: right"]6[/TD]
    [TD="align: right"]7[/TD]
    [TD="align: right"]8[/TD]

    [/tr]


    [tr]


    [td]

    JKL

    [/td]


    [TD="align: right"]1[/TD]

    [td][/td]


    [td][/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    MNO

    [/td]


    [TD="align: right"]1[/TD]
    [TD="align: right"]2[/TD]
    [TD="align: right"]3[/TD]
    [TD="align: right"]4[/TD]

    [/tr]


    [tr]


    [td]

    PQR

    [/td]


    [TD="align: right"]1[/TD]
    [TD="align: right"]2[/TD]
    [TD="align: right"]3[/TD]
    [TD="align: right"]4[/TD]

    [/tr]


    [tr]


    [td][/td]


    [TD="align: right"]5[/TD]
    [TD="align: right"]6[/TD]
    [TD="align: right"]7[/TD]
    [TD="align: right"]8[/TD]

    [/tr]


    [tr]


    [td][/td]


    [TD="align: right"]9[/TD]
    [TD="align: right"]10[/TD]
    [TD="align: right"]11[/TD]
    [TD="align: right"]12[/TD]

    [/tr]


    [tr]


    [td][/td]


    [TD="align: right"]13[/TD]

    [td][/td]


    [td][/td]


    [td][/td]


    [/tr]


    [/TABLE]

    to this: [TABLE="border: 0, cellpadding: 0, cellspacing: 0"]

    [tr]


    [TD="width: 72"]ABC[/TD]
    [TD="width: 72, align: right"]1[/TD]

    [/tr]


    [tr]


    [td]

    ABC

    [/td]


    [TD="align: right"]2[/TD]

    [/tr]


    [tr]


    [td]

    ABC

    [/td]


    [TD="align: right"]3[/TD]

    [/tr]


    [tr]


    [td]

    ABC

    [/td]


    [TD="align: right"]4[/TD]

    [/tr]


    [tr]


    [td]

    ABC

    [/td]


    [TD="align: right"]5[/TD]

    [/tr]


    [tr]


    [td]

    ABC

    [/td]


    [TD="align: right"]6[/TD]

    [/tr]


    [tr]


    [td]

    ABC

    [/td]


    [TD="align: right"]7[/TD]

    [/tr]


    [tr]


    [td]

    ABC

    [/td]


    [TD="align: right"]8[/TD]

    [/tr]


    [tr]


    [td]

    ABC

    [/td]


    [TD="align: right"]9[/TD]

    [/tr]


    [tr]


    [td]

    ABC

    [/td]


    [TD="align: right"]10[/TD]

    [/tr]


    [tr]


    [td]

    DEF

    [/td]


    [TD="align: right"]1[/TD]

    [/tr]


    [tr]


    [td]

    DEF

    [/td]


    [TD="align: right"]2[/TD]

    [/tr]


    [tr]


    [td]

    DEF

    [/td]


    [TD="align: right"]3[/TD]

    [/tr]


    [tr]


    [td]

    GHI

    [/td]


    [TD="align: right"]1[/TD]

    [/tr]


    [tr]


    [td]

    GHI

    [/td]


    [TD="align: right"]2[/TD]

    [/tr]


    [tr]


    [td]

    GHI

    [/td]


    [TD="align: right"]3[/TD]

    [/tr]


    [tr]


    [td]

    GHI

    [/td]


    [TD="align: right"]4[/TD]

    [/tr]


    [tr]


    [td]

    GHI

    [/td]


    [TD="align: right"]5[/TD]

    [/tr]


    [tr]


    [td]

    GHI

    [/td]


    [TD="align: right"]6[/TD]

    [/tr]


    [tr]


    [td]

    GHI

    [/td]


    [TD="align: right"]7[/TD]

    [/tr]


    [tr]


    [td]

    GHI

    [/td]


    [TD="align: right"]8[/TD]

    [/tr]


    [tr]


    [td]

    JKL

    [/td]


    [TD="align: right"]1[/TD]

    [/tr]


    [tr]


    [td]

    MNO

    [/td]


    [TD="align: right"]1[/TD]

    [/tr]


    [tr]


    [td]

    MNO

    [/td]


    [TD="align: right"]2[/TD]

    [/tr]


    [tr]


    [td]

    MNO

    [/td]


    [TD="align: right"]3[/TD]

    [/tr]


    [tr]


    [td]

    MNO

    [/td]


    [TD="align: right"]4[/TD]

    [/tr]


    [tr]


    [td]

    PQR

    [/td]


    [TD="align: right"]1[/TD]

    [/tr]


    [tr]


    [td]

    PQR

    [/td]


    [TD="align: right"]2[/TD]

    [/tr]


    [tr]


    [td]

    PQR

    [/td]


    [TD="align: right"]3[/TD]

    [/tr]


    [tr]


    [td]

    PQR

    [/td]


    [TD="align: right"]4[/TD]

    [/tr]


    [tr]


    [td]

    PQR

    [/td]


    [TD="align: right"]5[/TD]

    [/tr]


    [tr]


    [td]

    PQR

    [/td]


    [TD="align: right"]6[/TD]

    [/tr]


    [tr]


    [td]

    PQR

    [/td]


    [TD="align: right"]7[/TD]

    [/tr]


    [tr]


    [td]

    PQR

    [/td]


    [TD="align: right"]8[/TD]

    [/tr]


    [tr]


    [td]

    PQR

    [/td]


    [TD="align: right"]9[/TD]

    [/tr]


    [tr]


    [td]

    PQR

    [/td]


    [TD="align: right"]10[/TD]

    [/tr]


    [tr]


    [td]

    PQR

    [/td]


    [TD="align: right"]11[/TD]

    [/tr]


    [tr]


    [td]

    PQR

    [/td]


    [TD="align: right"]12[/TD]

    [/tr]


    [tr]


    [td]

    PQR

    [/td]


    [TD="align: right"]13[/TD]

    [/tr]


    [/TABLE]

    Feel free to direct me to another thread if this question already exists, I did google quite intensively but wasnt able to come across anything similar to this.


    Thanks in advance.