locked
I want to delete data in last rows RRS feed

  • Question

  • I have some data in range A1:H20. In B1:B5 is a common data X(say), B6:B10 Y(say) and B11:B20 Z(say). I want to delete entire rows having "Y" in Sheet 2 (say) from Sheet 1 (say) Xlrowsup . Can anyone help me with VBA macro. Thanks in advance.

    Regards,

    Harsha V.

    Tuesday, December 4, 2018 2:01 PM

Answers

All replies

  • Hi HarshaVardhan,

    Could you provide more detailed information?

    For example, what data does Sheet1 have?

    The data for a column in a row of Sheet1 is the same as one of the data in Y, which column is this column?

    Or is a row of data in Sheet1 contain all the data for Y?

    Best Regards,

    Bruce


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread.

    Wednesday, December 5, 2018 6:48 AM
  • Hi Bruce,

    Thanks for your support. Let me explain my exact process what to get the result.

    My Data: A1 - Apples, B1 - Red, C1 - 10

                  A2 - Apples, B2 - Green, C2 - 20

                  A3 - Mango, B3 - Green, C3 - 15

                  A4 - Mango, B4 - Yellow, C4 - 5     (Say containing in Sheet2)

    If my Selection from Sheet1 With a cell reference G5 is given as Green, then entire rows 2 and 3 should be deleted. If my choice is Mango then rows 3 and 4 should be deleted.

    Regards,

    Harsha V.

    Thursday, December 6, 2018 7:01 AM
  • Instead of deleting entire rows, deleting the specific range A2:C3, A3:C4 (say) may gives better results for me.
    Thursday, December 6, 2018 8:09 AM
  • Excel 365 Pro Plus with Power Query (aka Get & Transform)
    Delete Table records that contain data listed in various Tables.
    No formulas, no VBA macro, no dated cell references.
    http://www.mediafire.com/file/betp6b3d05du2nm/12_06_18.xlsx/file
    http://www.mediafire.com/file/sxc9ojcinzz94k4/12_06_18.pdf/file

    Thursday, December 6, 2018 3:57 PM