Selecting and deleting named range based on cell value

R

Rich Kniatt

I'm using a count function to return a value to cell M5.

I am trying to figure out the VB code to use that value to delete a
named range based on the following:

If M5 <20 delete range4
If M5 >20 but <41 delete range3
If M5 >20 but <61 delete range2
If M5 >20 but <81 delete range1
 
R

Rich Kniatt

I got it I think:

If Range("m5").Value < 21 Then Range("page2").Delete
else
...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top