+ Reply to Thread
Results 1 to 3 of 3

Implement CSE function through VBA with parameters

  1. #1
    Bastanu
    Guest

    Implement CSE function through VBA with parameters

    Would this type of solution be possible or do I have to do
    my calculations in VBA?

    I am trying to dynamically update a table based on a
    combination of two paramaters.

    So I need to add the formula below to a first month column
    and then copy it to all the other months.
    Can I do something like this in VBA:
    strFormula = _
    "{= SUM(IF(" & variable1 & " tl_transactions=$B11,IF(YEAR
    (" & variable2 & " tl_transactions) & MONTH(& variable2
    & " tl_transactions)=YEAR(D$9) & MONTH(D$9),tl_Net_Cost
    tl_transactions,0),0))}

    myRange.Formula=strFormula





  2. #2
    Don Guillett
    Guest

    Re: Implement CSE function through VBA with parameters

    ..formulaarray

    --
    Don Guillett
    SalesAid Software
    donaldb@281.com
    "Bastanu" <anonymous@discussions.microsoft.com> wrote in message
    news:052b01c52b47$5e3c4e10$a501280a@phx.gbl...
    > Would this type of solution be possible or do I have to do
    > my calculations in VBA?
    >
    > I am trying to dynamically update a table based on a
    > combination of two paramaters.
    >
    > So I need to add the formula below to a first month column
    > and then copy it to all the other months.
    > Can I do something like this in VBA:
    > strFormula = _
    > "{= SUM(IF(" & variable1 & " tl_transactions=$B11,IF(YEAR
    > (" & variable2 & " tl_transactions) & MONTH(& variable2
    > & " tl_transactions)=YEAR(D$9) & MONTH(D$9),tl_Net_Cost
    > tl_transactions,0),0))}
    >
    > myRange.Formula=strFormula
    >
    >
    >
    >




  3. #3
    bastanu
    Guest

    Re: Implement CSE function through VBA with parameters

    Don,
    Tried that but it doesn't work... I think the formulaarry wants an
    actual array


+ Reply to Thread

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