Prev: Round up or down by set variable
Next: MS Query - Filtering all dates greater than the current date
From: Rick on 26 Mar 2010 16:13 Can anyone tell me the proper structure for thid statement? ActiveCell.FormulaR1C1 = "=IF(TagNmeMe.value!RC[-1]="""","""",TagNmeMe.value!RC[-1])" TagNmeMe is a string that has the stored Sheet Name . if(sheet1!A5="","",sheet1!A5)
From: Luke M on 26 Mar 2010 16:21 ActiveCell.FormulaR1C1 = _ "=IF(" & TagNmeMe.value & "!RC[-1]="""",""""," & TagNmeMe.value & "!RC[-1])" -- Best Regards, Luke M "Rick" <Rick(a)discussions.microsoft.com> wrote in message news:F2510378-54F6-43D7-89F9-CB2803E229BA(a)microsoft.com... > Can anyone tell me the proper structure for thid statement? > > ActiveCell.FormulaR1C1 = > "=IF(TagNmeMe.value!RC[-1]="""","""",TagNmeMe.value!RC[-1])" > > TagNmeMe is a string that has the stored Sheet Name . > > if(sheet1!A5="","",sheet1!A5) > >
From: Rick on 26 Mar 2010 17:12 Luke the compiler did not like that code format ... "Rick" wrote: > Can anyone tell me the proper structure for thid statement? > > ActiveCell.FormulaR1C1 = > "=IF(TagNmeMe.value!RC[-1]="""","""",TagNmeMe.value!RC[-1])" > > TagNmeMe is a string that has the stored Sheet Name . > > if(sheet1!A5="","",sheet1!A5) > >
From: Dave Peterson on 26 Mar 2010 18:07 If tagnmeme is really a string, then it doesn't have any properties (like ..value). ActiveCell.FormulaR1C1 _ = "=IF('" & TagNmeMe & "'!RC[-1]="""",""""," & "'" & TagNmeMe & "'!RC[-1])" Sometimes, the sheet name has to be surrounded by apostrophes (if the sheet name in a number or looks like an address or contains spaces or ...). If you supply them and they aren't needed, excel won't care. But if you don't supply them and you do need them, excel will yell. Rick wrote: > > Can anyone tell me the proper structure for thid statement? > > ActiveCell.FormulaR1C1 = > "=IF(TagNmeMe.value!RC[-1]="""","""",TagNmeMe.value!RC[-1])" > > TagNmeMe is a string that has the stored Sheet Name . > > if(sheet1!A5="","",sheet1!A5) -- Dave Peterson
From: Rick on 26 Mar 2010 19:24 Thank Dave it work like a charm "Dave Peterson" wrote: > If tagnmeme is really a string, then it doesn't have any properties (like > ..value). > > ActiveCell.FormulaR1C1 _ > = "=IF('" & TagNmeMe & "'!RC[-1]="""",""""," & "'" & TagNmeMe & "'!RC[-1])" > > Sometimes, the sheet name has to be surrounded by apostrophes (if the sheet name > in a number or looks like an address or contains spaces or ...). > > If you supply them and they aren't needed, excel won't care. But if you don't > supply them and you do need them, excel will yell. > > > > Rick wrote: > > > > Can anyone tell me the proper structure for thid statement? > > > > ActiveCell.FormulaR1C1 = > > "=IF(TagNmeMe.value!RC[-1]="""","""",TagNmeMe.value!RC[-1])" > > > > TagNmeMe is a string that has the stored Sheet Name . > > > > if(sheet1!A5="","",sheet1!A5) > > -- > > Dave Peterson > . >
|
Pages: 1 Prev: Round up or down by set variable Next: MS Query - Filtering all dates greater than the current date |