delete blank value

smartguy

Well-known Member
Joined
Jul 14, 2009
Messages
778
hello all,

i have excel file in the below format.


Excel Workbook
ABCDEFGHIJ
1docusubdsdsddsdsssasadsds
2
31aaasasas12ds
42aaasasas22ds
53aaasasas32ds
64aaasasas42d
75aaasasas52d
86aaasasas62d
97aaasasas72d
108aaaa82d
11
129aaasasas92d
1310aaaasa102d
1411aaassa112d
1512aaasasas122d
1613aaasasas132d
1714aaasasas142d
1815aaasasas152d
1916aaasasas162d
2017aaaa172d
2118aaasasas182d
2219aaas192d
23
24
25
26
2720aaas202d
2821aaas212d
2922aaas222d
3023aaas232d
3124aaas242d
3225aaas252d
3326aaas262d
3427aaas272d
Sheet1


I want to delete blank data.

Answer :


Excel Workbook
ABCDEFGHIJ
1docusubdsdsddsdsssasadsds
21aaasasas12ds
32aaasasas22ds
43aaasasas32ds
54aaasasas42d
65aaasasas52d
76aaasasas62d
87aaasasas72d
98aaaa82d
109aaasasas92d
1110aaaasa102d
1211aaassa112d
1312aaasasas122d
1413aaasasas132d
1514aaasasas142d
1615aaasasas152d
1716aaasasas162d
1817aaaa172d
1918aaasasas182d
2019aaas192d
2120aaas202d
2221aaas212d
2322aaas222d
2423aaas232d
2524aaas242d
2625aaas252d
2726aaas262d
2827aaas272d
Sheet1
 
Last edited:

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
I got It......

Code:
Sub delete_rows()
Dim last_row As Long
last_row = Range("A" & Rows.Count).End(xlUp).Row

For i = last_row To 1 Step -1
    If Cells(i, 1) = "" Then
        Cells(i, 1).EntireRow.Delete
    End If
Next

End Sub
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,818
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top