+ Reply to Thread
Results 1 to 9 of 9

vba formula working but formulaarray not workng

  1. #1
    Forum Contributor
    Join Date
    07-07-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    256

    vba formula working but formulaarray not workng

    Dear Sir

    i have attached an excel format where in cell i3 one formula s to come automatically
    but because of and n formula formula array s required
    but when i run the macro error s coming
    can you guys kindly help
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: vba formula working but formulaarray not workng

    Try using .Formula2 rather than .Formula
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: vba formula working but formulaarray not workng

    Or, perhaps you should be using .FormulaArray?

  4. #4
    Forum Contributor
    Join Date
    07-07-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    256

    Re: vba formula working but formulaarray not workng

    Thank you sir
    Actually .formula array returns the following error
    Unable to set the FormulaArray property
    I cant reduce the size of the formula
    .formulaarray code is not working sir

  5. #5
    Forum Contributor
    Join Date
    07-07-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    256

    Re: vba formula working but formulaarray not workng

    this following code returns error Unable to set the FormulaArray property

    Cells(3, 9).FormulaArray in vba


    but when i use the same like Cells(3, 9).Formula in vba it works
    kindly see the excel sheet you will get my point sir

  6. #6
    Forum Contributor
    Join Date
    07-07-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    256

    Re: vba formula working but formulaarray not workng

    Hai can any one help me with this probem
    Thanks

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: vba formula working but formulaarray not workng

    Why not change your formula to this
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    which doesn't need array entry. That way you should be able to use VBA to add the formula without any problem

  8. #8
    Forum Contributor
    Join Date
    07-07-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    256

    Re: vba formula working but formulaarray not workng

    thank you very much sir
    it works nicely
    except one small thing/modification
    in the same excel sheet,i want our formula (at the end of our formula presently is IF(H3>1000,1000,0) )
    like if h2 is w (working day) and g2 is h( holiday)
    then the amount should come like if h3 is less than 1000, it should be the same amount example 500 means 500 ,250 means 250 but 1000 and above means 1000 only.if h3 is more than 1000,it should be 1000 only,can the formula be changed without using And sir

  9. #9
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: vba formula working but formulaarray not workng

    In that case just change the 0 at the end of the formula to H3

+ 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] workng with class modules, how to call a sub
    By dmcgov in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-28-2020, 07:43 AM
  2. [SOLVED] FormulaArray when inserting a formula
    By sriley5 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-08-2019, 05:42 PM
  3. Get Formula or FormulaArray from InputBox
    By dluhut in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-05-2019, 12:18 PM
  4. .FormulaArray causes Run Time Error 1004, Unable to set the FormulaArray property
    By dluhut in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-28-2017, 03:12 PM
  5. macro not workng in 2010 upgrade
    By TammyP in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-10-2015, 11:00 AM
  6. [SOLVED] FormulaArray Code not working
    By Sartorius in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-14-2012, 02:19 AM
  7. FormulaArray Not working
    By Daywalker in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-15-2009, 02:48 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