+ Reply to Thread
Results 1 to 9 of 9

Delete a entire row based on a certain text in cell "B3"

  1. #1
    Forum Contributor
    Join Date
    08-18-2017
    Location
    india
    MS-Off Ver
    2010
    Posts
    490

    Delete a entire row based on a certain text in cell "B3"

    Hey,

    is it possible to delete entire row based on certain text in a cell "B3"?

    Example:

    If i type "A234" in cell "B3" - sheet " Return", then it searches for it in sheet "Invoice data" column "F" and deletes the entire row.
    So I will write different text in cell "B3" and i want it to do the same as mentioned above.

    is it possible?

    With the help of Dabaho - Forum Contributor I have got this code. Thanks to Dabaho
    Please Login or Register  to view this content.
    However it says "Compile error: Invalid outside procedure"

    Can anyone please help me

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,519

    Re: Delete a entire row based on a certain text in cell "B3"

    Quote Originally Posted by anilpatni1234 View Post

    If i type "A234" in cell "B3" - sheet " Return", then it searches for it in sheet "Invoice data" column "F" and deletes the entire row.
    So I will write different text in cell "B3" and i want it to do the same as mentioned above.

    is it possible?
    Need to know data structure in "Invoice data".

    Post a small sample workbook.

  3. #3
    Forum Contributor
    Join Date
    08-18-2017
    Location
    india
    MS-Off Ver
    2010
    Posts
    490

    Re: Delete a entire row based on a certain text in cell "B3"

    Hey jindon,

    Here is the sample file.

    SO basically " Invoice data" contains details of products sold. I get the details with the help of vba macro.

    So when a customer returns a product then I want to enter the product code in sheet "Returns" - "B3" so that that can delete the details from sheet "invoice data"

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,519

    Re: Delete a entire row based on a certain text in cell "B3"

    Quote Originally Posted by anilpatni1234 View Post
    Here is the sample file.
    Where?



    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  5. #5
    Forum Contributor
    Join Date
    08-18-2017
    Location
    india
    MS-Off Ver
    2010
    Posts
    490

    Re: Delete a entire row based on a certain text in cell "B3"

    hey here is the sample file.
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,519

    Re: Delete a entire row based on a certain text in cell "B3"

    To "Return" sheet code module.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    08-18-2017
    Location
    india
    MS-Off Ver
    2010
    Posts
    490

    Re: Delete a entire row based on a certain text in cell "B3"

    Hey Thank you so much. This is magic.
    Is it possible to get a confirmation pop up message after we enter text in cell "B3" that "Are you sure you want to update?"

    Or instead of worksheet change can we have the macro running with the click of a button?

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,519

    Re: Delete a entire row based on a certain text in cell "B3"

    ....................
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    08-18-2017
    Location
    india
    MS-Off Ver
    2010
    Posts
    490

    Re: Delete a entire row based on a certain text in cell "B3"

    Hey jindon,

    Thanks you so much.

    Works wonders for me.
    Thank you

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. if a cell in column P contains "12345" then delete entire row
    By justlearning123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-19-2015, 10:55 AM
  2. [SOLVED] Code that copies row of data to another sheet based on text "Complete"/"Delete"
    By Dremzy in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 04-20-2014, 05:51 PM
  3. Replies: 2
    Last Post: 04-20-2014, 11:18 AM
  4. [SOLVED] Macro to delete entire roll when the cell has "CLOSED" text
    By ricdamiani in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-12-2013, 02:02 AM
  5. Delete entire row if "YES" is cell value
    By TShelt in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-14-2011, 10:46 AM
  6. [SOLVED] Macro to delete entire row if cell contains the word "total" or "Total"
    By theatricalveggie in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-10-2011, 12:38 PM
  7. Disabling "Entire &row/&column" in Delete/Insert Cell
    By Gap in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-06-2005, 12:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1