Results 1 to 3 of 3

WorksheetFunction in VBA

Threaded View

  1. #1
    Registered User
    Join Date
    01-03-2009
    Location
    Chicago,IL
    MS-Off Ver
    Excel 2007
    Posts
    11

    WorksheetFunction in VBA

    My workbook has a sheet called "MyList", another called "HisList" , a named range called "myNamedRange" which is "MyList!A:A".

    How do I get this functionality of this excel formula

     Countif(MyList!A:A, HisList!A1)
    in this vba code

    dblvalue=application.worksheetFunction(...)
    msgbox dblvalue
    The following code works with a named range
    wsHisList = Worksheets("HisList").Range("A1").offset(0,0).value
    Application.worksheetFunction(Range("myNamedRange"), wsHisList)
    My question is how can I use "MyList!A:A" directly in the worksheet function.

    Thanks
    Last edited by MacroLide; 01-20-2009 at 06:02 AM. Reason: Typo

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