#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 334
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 457
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 334
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 334
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
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
R1C1 Reference Style Default Randy Stewart Excel Discussion (Misc queries) 7 April 24th 12 04:20 PM
R1C1 reference style Helpme Please[_2_] Excel Discussion (Misc queries) 5 July 11th 07 11:12 PM
R1C1 Reference Style won't STAY gone? khrystle Excel Discussion (Misc queries) 5 March 1st 06 10:36 PM
R1C1 reference style Peg P Excel Discussion (Misc queries) 2 November 15th 05 06:48 PM
R1C1 reference Tony S Excel Discussion (Misc queries) 1 May 10th 05 05:58 PM


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

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

About Us

"It's about Microsoft Excel"