+ Reply to Thread
Results 1 to 4 of 4

syntax of array vba formula-error

  1. #1
    Registered User
    Join Date
    01-17-2015
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    85

    syntax of array vba formula-error

    Dear All,

    Kindly guide me what correction required so formula does work.

    .Range("H2").FormulaArray = "=SUM(IFERROR(1/COUNTIF($F$2:$F$" & Lastrow,IF($F$2:$F$" & Lastrow <F2,$F$2:$F$" & Lastrow)),0))+1"
    Regards,

    pnnaik
    Last edited by pnnaik; 04-01-2018 at 11:02 AM.

  2. #2
    Registered User
    Join Date
    01-17-2015
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    85

    Re: Error in array vba formula

    It gives compile error expected end of statement.

    Thanks,
    pnnaik

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    11,545

    Re: syntax of array vba formula-error

    Notice that the debugger highlights the comma after Lastrow. You are trying to concatenate l variable (Lastrow) calculated elsewhere with strings in several places, but you re missing several &" delimiters:
    Please Login or Register  to view this content.
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    01-17-2015
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    85

    Re: syntax of array vba formula-error

    You have fixed the issue.
    I was using following formula. It was required to change to variable row. So I was trying with variable.

    .Range("H2").FormulaArray = _
    "=SUM(IFERROR(1/COUNTIF($F$2:$F$134,IF($F$2:$F$134<F2,$F$2:$F$134)),0))+1"
    Is it same one or different?

    Thanks,
    pnnaik

+ 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. Array Formula Value Error
    By paynod in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-11-2017, 08:43 AM
  2. [SOLVED] Error in using formula array
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-18-2015, 03:10 AM
  3. [SOLVED] Array formula and the #DIV/0 error
    By at325 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-15-2015, 10:35 AM
  4. Array formula error
    By vonmunchy in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 11-13-2013, 09:42 AM
  5. [SOLVED] #VALUE! Error In With Array Formula
    By DDM64 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-29-2013, 11:17 AM
  6. #N/A Error in Array Formula
    By jrarmstrong4 in forum Excel General
    Replies: 7
    Last Post: 11-30-2011, 06:02 PM
  7. Error #NUM! - Array Formula
    By Shermaine2010 in forum Excel General
    Replies: 2
    Last Post: 08-21-2011, 03:44 AM

Tags for this Thread

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