Remove rows automatically - excel

I have a big Excel file and want to remove all but one of each 200 consecutive rows. If I have a file with 1,000 rows to keep only five.
How might I achieve this in a single operation?

Add a column with:
=ROW()=FLOOR(ROW(),200)
in Row1 and copy down to suit. Filter that to select FALSE and delete visible.
For Filter, select the column then go to DATA > Sort & Filter and click on Filter (the funnel). A small downward pointing arrow should appear to the right of the cell in Row1. Click it, uncheck (Select All) and check FALSE, OK.
Then click on the arrow extreme top left (intersect of the Row and Column Headings). Right click in the highlighted area and click on Delete. If you see no Row and Column Headings, go to VIEW > Show and check Headings.

Related

How to delete entire row if row contain "abc xyz" using excel operation

I have excel file. i need to delete entire row if row value contain "abc xyz".
enter image description here
Delete Filtered Rows
Select the whole 'table' range including headers.
Filter the range by using CtrlShift+L.
Click on the filter's drop-down arrow of the appropriate column.
In the drop-down menu, uncheck Select All, check abc xyz and press OK.
Select the row headings (1,2,3,4,...) of the filtered rows actually selecting the entire rows.
Right-click anywhere in the selection and in the appearing menu choose Delete Row.
Remove the filter by again using CtrlShift+L.

Setting Up A Potential Excel Macro

I'm not even sure if this is something you would use a macro to do the second question.
I have a spreadsheet of a list of cards in a card game I play on the PC. So this leads to two questions.
1) Column E is for legendaries. If the column value = 1, then I want the row to be filled a certain color. So IE: row 2, columns A, B, C,D,E all filled with orange.
2) How can I create a text link that will filter anything with a value in column E? Column E is only going to ever contain a "1" if it's present. I want to filter out all the values that are not one. Then how would I clear it?
You can download my Excel workbook if you wish from the following link: https://drive.google.com/file/d/0B0x25Dj52eXBT1dlSFE1YjBXV0k/edit?usp=sharing
Thanks in advance for any help.
For the first question, just use conditional formatting. Select your entire sheet, go to the Home ribbon, click "Conditional Formatting", then click "New Rule." Under "Rule Type," select "Use a formula to determine which cells to format". In the formula box, enter =$E1=1, then click "Format" to edit what you want those rows to look like. Hit "OK" and now all rows where E=1 should be changed.
As for the second question, the simplest way would be to select your header row, then go to the Data ribbon and click "Filter." The when you want to see your legendaries grouped together, simply click the drop-down arrow on column E's header and click "Sort Largest to Smallest." This way you can also sort by the other columns if you want (name, ID, whatever).

Copy data down a column if no two cells in the same row are blank

I am not able to check if two rows are empty.
As you can see in my screen shot (upper part) I have a spreadsheet with
Unit Data and Value as my columns. I would like to achieve the result shown in the lower part.
Currently I have the code which copies data until empty row occurs, but that doesn't fit my requirement. Please help in getting this macro built.
Filter on ColumnB to select (Blanks) (only), insert ' in the first blank in ColumnA and copy down to suit. Remove the filter, select ColumnA, HOME > Editing, Find & Select, Go To Special..., select Blanks (only), OK. =, Up Ctrl+Enter.

How to move cell colour when sorting data

In my spreadsheet I have coloured rows but when I sort the data the colours stay in the same place and don't follow the sorted data.
So if row B is red and the data moves to row A after sorting, row B remains red but I want row A to be red because that's where the corresponding data has moved to.
How can I do this?
It sounds like you're using a table and have applied a table style. You need to convert the table to a range, then convert it back. Do the following:
Select a cell in the the table, then under the 'Table Tools' > 'Design' tab, select Convert to Range. Select yes at the pop-up asking whether you'd like to convert it to a normal range.
Highlight the whole table again, the under the 'Insert' tab, select table. Click on ok in the pop-up window.
The formatting should remain consistent now when you're sort the data.

Delete a Row if a column is Empty

i want to delete complete row in excel if the value in A column in NULL (i mean empty).
is there any simple query which can do this ?
please don't say some filter way... :( they won't work for me :( if there is any EXCEL FORMULA please help me know friends...
A B C D E
10 20 ADE
56 AE A4 A76
4 EE AS EWS
45 SS EE
i want to delete the 1st and 4th row as column A rows are empty...
Try this:
Put a formula in cell F1: IF(A1="","",ROW())
Fill down the whole of column F. This should give you consecutive numbers, or blanks where column A is blank.
Select all of column F, Copy, then Paste special... values only. This will stop the numbers changing when you do step 4.
Select the whole table and sort by column F. This will put the rows you don't want at the bottom, where you can delete, hide or ignore them.
Delete column F once you're done.
Either
Highlight the whole area
Choose the Home tab, Sort & Filter, Custom Sort
Uncheck the option My data has headers
Choose to sort by column A in ascending order
The blanks will be at the bottom and you can delete this block
Note that this approach will not retain the original order, the following will:
Highlight from A1 downwards, to the end of the data
Choose the Home tab, Find & Select, Go To Special
Select the Blanks option; this will select all blank cells in this column
From the Home tab, Cells Group, choose to Delete Sheet Rows
If there are a lot of cells in column A then start by scrolling to the last cell; click in this cell and press Ctrl-Shift-Home to select all cells up to A1.
It can also be achieved with filtering, but a formula cannot delete rows.
Select the column you want to detect the blank rows in, go to Sort & filter and select filter. You will now see this column has a drop down box, click on this and go to the very bottom and untick the box called 'blanks'. this will now automatically hide the rows which contain blanks.
If you need to use the data in this format just copy and past it into a new worksheet using paste values as I am unsure how programs would it.

Resources