ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Problem with macro (https://www.excelbanter.com/new-users-excel/223468-problem-macro.html)

Dazed and Confused[_2_]

Problem with macro
 
I created a macro with hundreds of sets of criteria using Auto Filter to
delete rows that meet specific criteria. Here is an example:

Column A = 254
Column C = CTF
Shift + End + down arrow (to delete rows meeting this criteria)

Column A = 254
Column B = 220 or 221
Column C = WDI
Shift + End + down arrow (to delete rows meeting this criteria)

The problem is that this month's report does not have any values to meet the
second set of criteria, and therefore the remainder of my macro does not work
properly.

How do I write my macro to move on to the next set of criteria if it does
not find any values to meet the second set of criteria?

Thank you for any assistance!

Don Guillett

Problem with macro
 
As ALWAYS post your code for comments.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Dazed and Confused" wrote in
message ...
I created a macro with hundreds of sets of criteria using Auto Filter to
delete rows that meet specific criteria. Here is an example:

Column A = 254
Column C = CTF
Shift + End + down arrow (to delete rows meeting this criteria)

Column A = 254
Column B = 220 or 221
Column C = WDI
Shift + End + down arrow (to delete rows meeting this criteria)

The problem is that this month's report does not have any values to meet
the
second set of criteria, and therefore the remainder of my macro does not
work
properly.

How do I write my macro to move on to the next set of criteria if it does
not find any values to meet the second set of criteria?

Thank you for any assistance!



Shane Devenshire

Problem with macro
 
Hi,

Since you want us to fix your code, you need to show us the code. Very
simply I am seconding Don's comment.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Dazed and Confused" wrote:

I created a macro with hundreds of sets of criteria using Auto Filter to
delete rows that meet specific criteria. Here is an example:

Column A = 254
Column C = CTF
Shift + End + down arrow (to delete rows meeting this criteria)

Column A = 254
Column B = 220 or 221
Column C = WDI
Shift + End + down arrow (to delete rows meeting this criteria)

The problem is that this month's report does not have any values to meet the
second set of criteria, and therefore the remainder of my macro does not work
properly.

How do I write my macro to move on to the next set of criteria if it does
not find any values to meet the second set of criteria?

Thank you for any assistance!



All times are GMT +1. The time now is 04:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com