?
Solved

Checking to see if range is blank

Posted on 2014-03-17
3
Medium Priority
?
152 Views
Last Modified: 2014-03-17
Folks,
I need to check to see if in the range D7:D14 is blank to exit my sub. This did not work.
If Range("D7:D14").Value = "" Then
Exit Sub
End If

Open in new window

0
Comment
Question by:Frank Freese
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
duttcom earned 2000 total points
ID: 39935660
You could try using the countA function -

If WorksheetFunction.CountA(Range("D7:D14")) = 0 Then
Exit Sub
End If
0
 

Author Comment

by:Frank Freese
ID: 39935673
Ok....that'll work. Thanks
0
 

Author Closing Comment

by:Frank Freese
ID: 39935674
thank you
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question