Excel VBA to Delete Rows if Cell is Blank - Delete Rows Based on Cell Value - Code Included

  Рет қаралды 20,491

Excel Destination

Excel Destination

3 жыл бұрын

This Excel VBA Tutorial explains VBA Code to delete rows when cell is blank. You can use For Loop with If Condition to write VBA code to delete rows based on cell value condition.
VBA Code , used in this example is as follows :
a = Worksheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To a
If Worksheets("Sheet1").Cells(i, 3).Value = "" Then
Rows(i).Delete
End If
Next

Пікірлер: 29
@silverlicious2086
@silverlicious2086 3 жыл бұрын
Good example. Thank you for all your effort.
@ExcelDestination
@ExcelDestination 3 жыл бұрын
Glad it was helpful!
@vv9730
@vv9730 2 жыл бұрын
THANKS A LOT..THIS VIDEO HELPED ME A LOT...!!!
@MohAboAbdo
@MohAboAbdo 3 жыл бұрын
Thank you so Mitch, Sur.
@ExcelDestination
@ExcelDestination 3 жыл бұрын
Welcome!
@AnilKumar-tm6fq
@AnilKumar-tm6fq 3 жыл бұрын
Sir it's really helpful I searched have many videos still little bit helps I will try if not I will ask you.
@kishormandal3560
@kishormandal3560 Жыл бұрын
Thank you 💗💛
@alvingapay2592
@alvingapay2592 2 жыл бұрын
Hi Sir, this is a good video! Sir how about if you want to delete multiple values in a column like blanks, delhi and pune? Thanks and more video to teach and inspire others.
@bryonlim3183
@bryonlim3183 Жыл бұрын
Thanks!
@mahendraprajapati9809
@mahendraprajapati9809 Жыл бұрын
Thank you
@kldrhmn8324
@kldrhmn8324 3 жыл бұрын
Thank you for the video can you please to show how to delete the entire empty row based on the entire empty cells row (not based on the first empty cell) because there some data gets lost
@tannertucker22
@tannertucker22 3 жыл бұрын
Thank you very much. What I think would be very helpful is if the deleted row and cell value were copied to another worksheet. This way someone can use the worksheet with the rows containing the missing data to find the missing data.
@ExcelDestination
@ExcelDestination 3 жыл бұрын
yes, that's a good thought.
@tannertucker22
@tannertucker22 3 жыл бұрын
@@ExcelDestination i am an auditor. Auditor always want to know what is missing.
@tannertucker22
@tannertucker22 3 жыл бұрын
Even better. Shade blank cells yellow or any color within the current region. Then delete any row with a blank cell. The paste to new worksheet. No you have a worksheet that a user can find the missing data with the cells (Formatted) shaded that require data.
@shalinigupta1419
@shalinigupta1419 3 жыл бұрын
Good
@jiya2907
@jiya2907 11 ай бұрын
One row selected not blanked cell that one row delete, pls help me sir... This for my own created sales sheet row line k13 to p13 after row using to this
@rajeshrawat2512
@rajeshrawat2512 Жыл бұрын
sir how to copy non blank rows in new sheet for multiple column in data set
@1982degoel
@1982degoel Жыл бұрын
is it possible to delete just one cell 9not entire row )based on cell value
@asonayaz
@asonayaz 3 жыл бұрын
Can you delete any row where the sum of any row equal zero?
@ExcelDestination
@ExcelDestination 3 жыл бұрын
yes, we can do that. some additional code is required to check sum before deleting row.
@aathifts280
@aathifts280 10 ай бұрын
The problem in this approach is when there multiple empty values it should delete one and move to next
@krutikalimje9186
@krutikalimje9186 2 жыл бұрын
Not working for me
@SanviPatil2019
@SanviPatil2019 Жыл бұрын
Here, how we can delete non blank rows..
@samiawad504
@samiawad504 Ай бұрын
Need code to delete only if the whole row is empty not cell
@sajitht7246
@sajitht7246 2 жыл бұрын
IT IS NOT WORKING IF THERE IS CONTINUES BLANKS REPEATS
@shaileshrane8542
@shaileshrane8542 2 жыл бұрын
NOT WORKING
@ABCEE1000
@ABCEE1000 2 жыл бұрын
too complicated tho
@ilkergencel9800
@ilkergencel9800 2 жыл бұрын
it is very useful however, I have a table copying from 1 book to another book and finally I want to delete empty rows from the 2nd table. I tried your method but not working for me. Private Sub CommandButton1_Click() a = Worksheets("hedef.xlsm").Cells(Rows.Count, 1).End(xlUp).Row For i = 2 To a If Worksheets("hedef.xlsm").Cells(i, 3).Value = "" Then Rows(i).Delete End If Next End Sub can you please advise?
Excel VBA: How to Delete Blank Rows [Two Techniques]
12:13
Skills and Automation
Рет қаралды 4,4 М.
Beautiful gymnastics 😍☺️
00:15
Lexa_Merin
Рет қаралды 12 МЛН
ПРОВЕРИЛ АРБУЗЫ #shorts
00:34
Паша Осадчий
Рет қаралды 6 МЛН
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 8 МЛН
Nutella bro sis family Challenge 😋
00:31
Mr. Clabik
Рет қаралды 14 МЛН
VBA to Delete Multiple Columns based on Headers - Excel VBA Macro Example
8:45
Highlight Rows Based on Cell Value in Excel
12:07
TrumpExcel
Рет қаралды 280 М.
Delete Rows Based On Criteria Excel VBA Macro
6:39
Excel Macro Mania
Рет қаралды 43 М.
Delete Rows based on Value/Text // Excel VBA Tutorial
8:53
Data Nik
Рет қаралды 19 М.
VBA Macro to Delete Rows Based on Cell Values
9:32
Excel Campus - Jon
Рет қаралды 138 М.
Excel VBA IF THEN Statement (with ELSEIF & Looping in cells)
12:10
Leila Gharani
Рет қаралды 313 М.
Beautiful gymnastics 😍☺️
00:15
Lexa_Merin
Рет қаралды 12 МЛН