+ Reply to Thread
Results 1 to 2 of 2

Selecting and deleting named range based on cell value

  1. #1
    Registered User
    Join Date
    01-27-2005
    Location
    Northern VA
    Posts
    16

    Selecting and deleting named range based on cell value

    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

  2. #2
    Registered User
    Join Date
    01-27-2005
    Location
    Northern VA
    Posts
    16
    I got it I think:

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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1