Results 1 to 10 of 10

checking whether a number of cells have values

Threaded View

  1. #1
    Registered User
    Join Date
    07-21-2010
    Location
    quezon
    MS-Off Ver
    Excel 2007/2010
    Posts
    27

    checking whether a number of cells have values

    Hi, is there a way to use IF statement to check whether cells have values in them? I'm using this code which doesn't work

    If Worksheets("Main").Range("O5:O16, P5:P16").Range <> "" Then
    'code here
    end if
    The alternate i'm thinking of is individually checking each cell

    If Worksheets("Main").Range("O5").Range <> "" Then
    if worksheets("Main").range("O6").range<> "" then
    'code here
    end if
    end if
    but it will make the codes look messy.
    Last edited by LAazsx; 08-05-2010 at 12:42 PM.

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