+ Reply to Thread
Results 1 to 5 of 5

Cell Address variable in a formula help

  1. #1
    Forum Contributor
    Join Date
    05-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    184

    Cell Address variable in a formula help

    Can someone help me modify this formula vba?

    HTML Code: 

    How come the code ActiveCell.Formula = "=COUNTIF(VariableTop:VariableBottom)" doesn't work?
    Last edited by alexduy; 12-08-2014 at 03:23 PM.

  2. #2
    Forum Contributor
    Join Date
    03-04-2014
    Location
    Canada Eh
    MS-Off Ver
    Excel 2010
    Posts
    199

    Re: Cell Address variable in a formula help

    enter the formula where?

    Never mind, I see you want it in the active cell
    Click the * to give Rep to a post you like.

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Cell Address variable in a formula help

    Your formula has a circular reference, and COUNTIF needs a criteria.
    Please Login or Register  to view this content.

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Cell Address variable in a formula help

    One reason the OP code doesn't work is that COUNTIF requires two arguments, the OP is only giving it one range.

    Try
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  5. #5
    Forum Contributor
    Join Date
    05-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    184

    Re: Cell Address variable in a formula help

    Thank you all, it was helpful.

+ 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] Assigning A Cell Address to A Variable, Using A Variable - Error '1003'
    By ch_abs in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-28-2014, 01:36 PM
  2. [SOLVED] ? Variable Ranges ? how to change address in Formula range base on another cell value ?
    By DrAlloway in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-27-2014, 07:34 PM
  3. Cell Address of a Variable
    By RTR97 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2012, 06:57 PM
  4. syntax for value of a variable containing address in formula
    By Dewy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-10-2010, 12:57 PM
  5. How can I use a variable as cell address?
    By Matt in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-27-2005, 04:05 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