Excel VBA Macro: Delete Rows Based on Cell Value (Zeros and Blanks)

Excel VBA Macro: Delete Rows Based on Cell Value (Zeros and Blanks)

greggowaffles

5 лет назад

34,377 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

sarsink Managing
sarsink Managing - 12.06.2023 13:00

any one can reply me soon

Ответить
sarsink Managing
sarsink Managing - 12.06.2023 12:40

i have deleted my table by your code
how can i return it
please reply me as soon as posible

Ответить
C S
C S - 16.02.2023 00:53

thanks for your help! it worked for me! even if the solution does not seem to be the cleanest it is the most effective one for my problem so far.

Ответить
Andriy Fedoriouk
Andriy Fedoriouk - 19.01.2023 03:05

Worked great for me on a 20,000 row monster GTF RNA sequencing reference genome file after I deleted the i=i-1. I think my loop got stuck if that remained in there. But, I had no sequential conditional deletions since the file staggers everything I needed to delete in the first row of any 4. Thanks for the help Gregg.

Ответить
Kuul Dott
Kuul Dott - 28.12.2022 03:30

Happy new year dude!!! Wishing you best if luck!!! 🥳💯

Ответить
shravan bollineni
shravan bollineni - 25.11.2022 21:54

I'm trying to do the same task. But my macro is taking more than 5minutes to do it. Can someone please help me on how to optimise it.

Ответить
Darika E
Darika E - 24.10.2022 05:36

This works like a charm! Thanks, man!

Ответить
Sammy
Sammy - 26.09.2022 02:45

Thanks! How do you have this code run through all the sheets?

Ответить
Selva N
Selva N - 30.08.2022 11:06

Thank you for the video. By any chance do you know how to use excel VBA to delete all cells from row 5 till the last row?

Ответить
Sandip Makwana
Sandip Makwana - 04.05.2022 16:51

Actualy i make it by "for i " method but when delete row , the next row is take old row position so i can't delete row in one click but i get solution by your vedio thanks a lots

Ответить
janez klun
janez klun - 03.12.2021 23:23

Good tutorial, thank you for sharing

Ответить
Office provement
Office provement - 06.11.2021 22:04

Thanks for a great video, you explained it really well and in such a short time too :)

Ответить
Ravi kumar
Ravi kumar - 05.08.2021 10:15

Would u like to make video on VBA for find a specific word and delete the entire column.

Ответить
matrix26uk
matrix26uk - 29.06.2021 17:08

I have a excel doc like this.
How would use your macro to delete everything except the lines containing "hostname" and "transport output none"?
The document I have can have over 3000 lines

hostname XXXXXXXXXXXXXXXX
line con 0
exec-timeout 5 0
password 7
no modem enable
transport output none
hostname XXXXXXXXXXXXXXX
line con 0
exec-timeout 5 0
password 7
no modem enable
transport output none
hostname XXXXXXX
line con 0
exec-timeout 5 0
password 7
no modem enable
transport output none
hostname XXXXX
line con 0
exec-timeout 5 0
password 7
no modem enable
transport output none
hostname XXXXX
line con 0
exec-timeout 5 0
password 7
no modem enable
transport output none

Ответить
Finni Shaji
Finni Shaji - 02.05.2021 05:19

Hello, this video is really helpful.
I was wondering if there a way to add multiple conditions.

Eg. delete all the rows with "0", "1" and "5".
Thank you.

Ответить
Sebastian
Sebastian - 27.04.2021 21:07

excellent video! Thanks you saved me a lot of time :D

Ответить
Pav Singh
Pav Singh - 17.04.2021 20:33

Incredible video, thanks so much

I'm not a coder but I feel like it's an easy fix.
If I require columns (for instance) C, E and G (so not just i,7; but i,3 and i,5 as well) to run the same code (but I do not want to go through the effort of changing it from i,3 to i,5 etc etc in the module for each sheet), how best could I do this?

Thank you!

Ответить
shreyansh shah
shreyansh shah - 21.02.2021 20:05

instead of deleting entire row, can I delete just a select rang
my data is upto 9 columns and my 3rd column has values
i want to delete from cell A2:I2 if C2 is zero and then shift the below data up.

Ответить
Bruno Maia
Bruno Maia - 18.12.2020 09:21

Finally a simple way to delete blank rows... been looking for days

Ответить
Viscari Inc.
Viscari Inc. - 20.10.2020 03:48

Man thank you so much! I'm stuck with this issue for an hour, couldn't imagine it would be so difficult! There is no solution in portuguese channels or site. Greetings from Brazil!

Ответить
Andrew Matthews
Andrew Matthews - 08.09.2020 04:34

VERY GOOD i attached the Macro to a button works OK. That's tedious having to press a button each time to remove the zero's in a column. Is there a way that when a zero is entered into a cell that the row is deleted automatically

Ответить
Javier LAO
Javier LAO - 07.07.2020 18:48

Does this work for text? Like if I wanted to delete rows with "NULL" as the value?

Ответить
A B
A B - 01.05.2020 22:03

by far the best explained tutorial. you helped me greatly!

Ответить
Armo Txa
Armo Txa - 25.03.2020 13:27

Thank you Gr8 Lessons

Ответить
vinay ponnuru
vinay ponnuru - 10.02.2020 19:33

not working for me:(

Ответить
AthleticPear
AthleticPear - 09.04.2019 07:04

Thank you for the help! You saved my semester!!!

Ответить