+ Reply to Thread
Results 1 to 6 of 6

Using CELL function...

  1. #1
    Forum Contributor
    Join Date
    10-12-2018
    Location
    Leesburg, FL
    MS-Off Ver
    2013
    Posts
    113

    Using CELL function...

    I am trying to call the Excel CELL function using VBA from the workbook that is running the macro. I'm assuming I just have a syntax error, but I can't figure it out. I am using Excel 2013.
    Please Login or Register  to view this content.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,282

    Re: Using CELL function...

    There is absolutely no point to that. You can just use the FullName property of the relevant workbook in VBA.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Contributor
    Join Date
    10-12-2018
    Location
    Leesburg, FL
    MS-Off Ver
    2013
    Posts
    113

    Re: Using CELL function...

    Thanks Rorya! I will try that instead. However, just out of curiosity, why doesn't the above statement compile/run?

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,282

    Re: Using CELL function...

    Because the WorksheetFunction object doesn't have a CELL method, for much the reason I suggested - i.e. there is no need for it.

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Using CELL function...

    Hi bvwalker,

    Not all normal excel functions are supported using the VBA worksheetfunction method. I don't think "Cell" is supported. See:
    https://support.microsoft.com/EN-US/help/213660

    See a list of all the supported functions at:
    https://docs.microsoft.com/en-us/off...ksheetFunction
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  6. #6
    Forum Contributor
    Join Date
    10-12-2018
    Location
    Leesburg, FL
    MS-Off Ver
    2013
    Posts
    113

    Re: Using CELL function...

    Thanks for the information MarvinP!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] cell a function doing math on previous sheet, cell b - cell c result in cell d...
    By dad812 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-08-2018, 08:20 AM
  2. Replies: 1
    Last Post: 06-02-2015, 01:38 AM
  3. Offset function with reference cell equal to the value of match function
    By cmurda in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-08-2014, 02:09 PM
  4. index function error using match function to get data from a cell in an array
    By mabildgaard in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-17-2013, 02:21 AM
  5. if cell is wrapped with IFERROR function, then delete the function from the cell
    By Shishek in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-20-2012, 07:21 PM
  6. Combine time cell and function cell with new function
    By murdoc158 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-17-2012, 09:37 AM
  7. Replies: 2
    Last Post: 03-20-2009, 01:29 PM

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