How to automatically delete certain rows in Excel?

How to delete rows using excel function?

  • I names in the spreadsheet in column A and Yes or No in column B. I want to make a function that if Yes in B1 then delete row 1. I am very new to excel so I really don't yet understand really complex excel stuff.

  • Answer:

    For future Questions, please state the version and update level of MS-Excel that you use, it makes a difference in the details of the Answer. If the data already exists for all of your rows, and you only want to clean up that data by removing those rows with column B having "Yes" values, then just sort your data and follow-up by selecting your "Yes" rows and deleting them. Besides sorting, another method is using DATA ==> AUTOFILTER so that you can only show the "Yes" rows. Then you can select those rows and delete them. If you are wanting an automatic way of removing rows when a cell's value in column B changes to "Yes", then you will need to create some VBA code to add to your workbook. (Let us know if that is what you are looking for.) .

Morgan at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

I don't think there's a function in excel to accomplish this. There might be a way to do it with Excel programming, VBA or macros, but that is very complex for a beginner. Here's what I'd recommend instead. 1) Sort the data by column B (so they'll be contiguous), then 2) delete the rows containing "Yes" in column B. Here's how: 1) Single-click on any one cell in column B that contains data. 2) On the menu bar click "Data", then click "Sort". 3) In the Sort dialog box make sure the first Sort by drop-down box has "Column B" selected (or the column header if you have any). Click OK. Now all of the like data in column B is grouped together by row. 4) Select and delete the rows containing "Yes" in column B. For example, if you want to delete rows 3 through 5, move the mouse over the 3 at the far left of the spreadsheet until it becomes a bold right-pointing arrow, then left click and drag down until rows 3, 4 and 5 are selected. Let go of the mouse button. Now that the three rows are selected, right-click anywhere over the selected area, then click delete. Done.

Ethan

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.