$$Excel-Macros$$ Dynamic file name and sum

2011-06-08 Thread Skanda
Vasant, Can I run the following as is or do I have to make changes to the path etc? I tried running as is,and I'm getting an error Previous Month File does not exist. I saved both files on desktop. Sub UpdateFormula2() Dim Flnm As String, Mn As String, Yr As Integer, PrevMn As String Dim FlPath A

Re: $$Excel-Macros$$ Dynamic file name and sum

2011-06-03 Thread Skanda
Vasant, I will try this out and let you know. Thanks for the quick around. On Fri, Jun 3, 2011 at 1:12 AM, Vasant wrote: > There are many approaches of doing it. > > I have listed two here.. > > Pass the month and year as parameters to the - 'UpdateFormula' subroutine. > You can pass the para

Re: $$Excel-Macros$$ Dynamic file name and sum

2011-06-03 Thread Vasant
There are many approaches of doing it. I have listed two here.. Pass the month and year as parameters to the - 'UpdateFormula' subroutine. You can pass the parameters either through a worksheet change event or a userform. 'Trigger on worksheet change event in Memo sheet (all the workbooks has t

Re: $$Excel-Macros$$ Dynamic file name and sum

2011-06-02 Thread Skanda
Vasant,I'm seeking help to write a macro. On Thu, Jun 2, 2011 at 12:23 AM, Vasant wrote: > A crude way of doing it is using the indirect function (though not > advisable), on condition that the file name is updated in C13 cell and file > is open. > Generally Indirect is not used outside a workbo

Re: $$Excel-Macros$$ Dynamic file name and sum

2011-06-02 Thread Vasant
A crude way of doing it is using the indirect function (though not advisable), on condition that the file name is updated in C13 cell and file is open. Generally Indirect is not used outside a workbook =SUM(prod!J2:J9)-SUM(INDIRECT("["&C13&"]prod!$I$2:$I$9")) The other way round is writing a macr

Re: $$Excel-Macros$$ Dynamic file name and sum

2011-06-01 Thread Skanda
vasant everymonth we have to change the file name.i.e MAR_2011 On Wed, Jun 1, 2011 at 4:58 AM, Vasant wrote: > Hi Skanda, > > > =SUM(prod!J2:J9)-SUM([DDD_Report_Mar_2011.xls]prod!$I$2:$I$9) > > Hope this helps > > Regards > Vasant > > On Wed, Jun 1, 2011 at 12:15 AM, Skanda wrote: > >> There are