Delete a Row if a column is Empty - excel

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.

Related

How to delete a columns duplicate cell value, and move up the other values in it's row

As you can see in the picture, I have a column with many duplicate values. I would like to delete the duplicate cell values leaving only the top value, but at the same time move the the rows up like so:
Does anyone know what equation I would write to achieve this?
Remove duplicates on the first column, by selecting the particular column and clicking on remove duplicates
Select the rest of the data
Press f5-->Special-->go to special dialog box appears
In the dialog box, check in 'Blanks' and Click ok
You will see all blank cells selected. Right click and click on delete
You will have a option box. Select shift cells up
Thats it.
Assuming your data is consistent i.e. values in left most column (as per your image) are repeated 5 times and is in Column A with corresponding values in Column C to Column G, try the following
In Cell I2 enter the following formula
=OFFSET($A$2,FLOOR((ROW(A2)-ROW($A$2))*5,1),0)
Drag/Copy down as required
Then in Cell J2 enter
=OFFSET($C$2,(COLUMN(C2)-COLUMN($C$2))+(ROW($C2)-ROW($C$2))*5,COLUMN(C2)-COLUMN($C$2))
Drag/Copy down as per data in Column I and across (to right) till Column N. See image for reference.
Note : If any of the target cell is blank then result will show 0 as output.

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.

Trying to select rows that matched in vlookup excel

I am trying to select the rows of the results from my VLOOKUP and put the results in a neat table in another sheet. The row in my "M" column has a lot of NA and random numbers that were matched.
See this image for clarification:
I want to select all the rows that returned a result and move those rows to another sheet in a table without blank rows between the results. I am not sure how to do this but I know a resident stackoverflow pro probably thinks this is cake. Thanks for the help in advance!
You could make use of a filter:
Select your table and put a filter (under Home tab, Sort & Filter).
Uncheck the #N/A in the selection filter (click the little grey box with black arrow for the column where there are the #N/A that appeared when you inserted the filters).
Copy and paste everything you need into the other sheet.
You can do this with some formulas:
In the column next to your VLOOKUP (I assume it's column C) place a 'counter formula'- in D2, place =IF(ISERROR(C2),0,1), in D3 and below: =IF(ISERROR(C3),D2,D2+1)
Create a new table (say in starting in column F in the same sheet)
In the first column of the table, just place increasing numbers (e.g. in F2: =ROW()-1)
In the next columns, use INDEX/MATCH to retrieve the results, e.g. in G2: =INDEX(A:A,MATCH(F2,D:D,0))
Done!

Excel: Agregate multiple tables separated by title

I have an excel file generated by SAP. I need change its format from multiple tables separated by a title to one single table. This is the original table:
and i need it to look like this:
Im new to excel, so i dont have a clue how to do it.
I cant do it manually becuase the file has 5000+ rows.
Any guidance?
I usually use the generic formula:
=IF(XX="",YY,XX/ZZ)
Where XX is a cell you can use to identify a header to append to the individual transactions and YY is the cell directly above the cell you have put your formula. XX is when you need that value itself, ZZ is another value. You'll understand when you apply it.
For instance, here, you could use cell D5 to do this. I would insert two columns before column D (the value of cell D5 is now in cell F5), and put this formula in cell C5:
=IF(F5="",C4,B5)
I will then fill the formula down. This carries the Material ID everywhere down to the last row. There are two quick ways to do this in a file of this type:
Copy the formula, scroll to the bottom of the sheet, hold Shift and click the last cell in the column, then paste.
Select the cell containing the formula, scroll to the bottom of the sheet, hold Shift and do Ctrl + ,D.
In cell D5, I would put the formula:
=IF(F5="",D4,F5)
And fill it down as well to get the material description.
Now for the size per unit, you can create a column to the right of column K (column K now has 'Size per Unit' since we inserted two columns earlier), and put this formula in cell L6:
=IF(K6="",L5,K6)
Fill it down to get it everywhere.
Now, to finish it up, select the whole sheet and copy/paste values (Paste Special > Paste Values) to remove the formulae. Delete rows 1 and 2, put a filter and sort by a field such as the column 'Metric'. Go to the bottom and delete the no longer needed rows.
As a bonus, if you need to make absolutely sure that the order of the transactions is the same as initially, insert a column somewhere, put sequential numbers into it; that is the first cell in the column has 1, the second 2, then 3 etc and fill to the bottom. Be sure that it is in the filter when you delete the unneeded rows, and sort by this column when you are done.
5000+ rows is still good though, I've had to deal with 10+ workbooks each with ~90000 rows once ;)

Copy paste line items in Sheet B to filtered rows in Sheet A in Excel?

I have Sheet A with 500 line items.
Suppose I have applied filter to show line items "2","44","68" and so on
From Another Sheet i want to select some rows and paste them in these filtered rows.If I paste,they get copied on line items 2,3,4,5, and so one instead of 2,44,68,etc
Can Someone please help me.I tried paste special,but it has same issue.
I also tried selecting the area to paste,then clicking alt + ; but the data also gets copied into unfiltered items.
This is more of an approach solution then a coding solution. I assume that the current order of the rows must be maintained.
Add a column to to your sheet, use autocomplete to number the current order of the rows.
Sort by your filter value(s) - if you have multiple values, just add another column and put a single unique value in it
Paste your values
Sort by you current order column, to restore the orginal order
If it is with same sheet you can make the two columns adjacent by hiding other columns in between. You can block the data and drag it to next column.
For eg.
I have column A, B, C, D.
Let A be ZIP CODE & Column D is 'Shipping Service'
I need to have ZIP CODE(Column A) with '95035' to have Shipping Service as 'Fedex'
Filter the column A with '95035'
Hide the column B & C
Drag the values from A to D directly where the values are copied to the adjacent cells.
Note: If you use two separate sheets copy the columns entirely to the sheet 1 adjacent to the column you want to copy and again take copy the entire column back to Sheet 2. This will work if both sheet have same number of rows.
Thanks,
Karthik
The easiest coding solution is to use vlookup http://office.microsoft.com/en-us/excel-help/vlookup-HP005209335.aspx
On sheet1 from Sheet2 use
=VLOOKUP(B3,Sheet2!A:B,2,FALSE)

Resources