VBA Code IF AND Statement

Stjtoth

New Member
Joined
Jan 19, 2017
Messages
1
I run a report everyday that puts the the word "NULLIFIED" in either column "L" or "M". I would like to create a macro that would delete the a row that has the word Nullified if nothing else appeared under the columns G, H, I, J, K, L, M, or N in that row, however if there is other data under these columns, I would only need to delete the word NULLIFIED.

This is done to clean up the data received. How can I create a macro that will delete the row if the word "NULLIFIED" is under the columns "L" or "M", but only deletes the word NULLIFIED if there is data under in the row under the columns G, H, I, J, K, L, M, or N.

I hope this makes scenes. Please let me know if you have any questions.

Thanks in Advance!
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hi and welcome to MrExcel,

Just clarification:
puts the the word "NULLIFIED" in either column "L" or "M"
This doesn't match with your requirements of
if nothing else appeared under the columns G, H, I, J, K, L, M, or N in that row
because in L or M will be the word 'NULLIFIED".

So do you only want to delete the word nullified or do you want the complete row deleted if there's no data in the column G, H, I, J, K, or N?
 
Upvote 0

Forum statistics

Threads
1,215,220
Messages
6,123,693
Members
449,117
Latest member
Aaagu

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