Implement CSE function through VBA with parameters

B

Bastanu

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
 
B

bastanu

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top