A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

R1C1 reference



 
 
Thread Tools Display Modes
  #1  
Old March 26th, 2010, 08:13 PM posted to microsoft.public.excel.misc
Rick
external usenet poster
 
Posts: 727
Default R1C1 reference

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)


  #2  
Old March 26th, 2010, 08:21 PM posted to microsoft.public.excel.misc
Luke M[_4_]
external usenet poster
 
Posts: 451
Default R1C1 reference

ActiveCell.FormulaR1C1 = _
"=IF(" & TagNmeMe.value & "!RC[-1]="""",""""," & TagNmeMe.value & "!RC[-1])"

--
Best Regards,

Luke M
"Rick" wrote in message
...
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)




  #3  
Old March 26th, 2010, 09:12 PM posted to microsoft.public.excel.misc
Rick
external usenet poster
 
Posts: 727
Default R1C1 reference

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)


  #4  
Old March 26th, 2010, 10:07 PM posted to microsoft.public.excel.misc
Dave Peterson
external usenet poster
 
Posts: 19,791
Default R1C1 reference

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
  #5  
Old March 26th, 2010, 11:24 PM posted to microsoft.public.excel.misc
Rick
external usenet poster
 
Posts: 727
Default R1C1 reference

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
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:54 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.