Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Jun 2001
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Excel Variable Definition (ExcelXP)

    I've created a variable called CountEmptyCells. I want the value of that variable to be equal to the total number of blank cells in the current selection. It seems I should be able to use the Countblank function, but I can't figure out how. Any help of sorting this out would be greatly appreciated. Thanks,

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Excel Variable Definition (ExcelXP)

    To use a worksheet function in VBA, use the Application.WorksheetFunction object:

    CountEmptyCells = Application.WorksheetFunction.CountBlank(Selection )

  3. #3
    Star Lounger
    Join Date
    Jun 2001
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel Variable Definition (ExcelXP)

    Hans,
    that was it exactly. Thank you very much. One of these days all of this will make perfect sense to me.

Posting Permissions

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