Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 334
Default ActiveCell.FormulaR1C1

I need help....
The following statement is being used in a do loop.

ActiveCell.FormulaR1C1 = "=IF(" & TagNmeMe & "!R[" & Cnt1 &
"]C[-1]="""",""""," & TagNmeMe & "!R[" & Cnt1 & "]C[-1])"

What I need it to do is this:
if(sheet1!A5="","",sheet1!a5) then 9 rows down paste this:
if(sheet2!A5="","",sheet2!a5)

Problem is when recording a macro the cnt1 changes from nothing to 9 then to
18 but the formula does not mimic what recording did.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default ActiveCell.FormulaR1C1

hi
try....
ActiveCell.Formula = "=IF(Sheet1!A5="""","""",Sheet1!A5)"
Activecell.offset(9,0).formula = "=IF(Sheet2!A5="""","""",Sheet2!A5)"

regards
FSt1

"Rick" wrote:

I need help....
The following statement is being used in a do loop.

ActiveCell.FormulaR1C1 = "=IF(" & TagNmeMe & "!R[" & Cnt1 &
"]C[-1]="""",""""," & TagNmeMe & "!R[" & Cnt1 & "]C[-1])"

What I need it to do is this:
if(sheet1!A5="","",sheet1!a5) then 9 rows down paste this:
if(sheet2!A5="","",sheet2!a5)

Problem is when recording a macro the cnt1 changes from nothing to 9 then to
18 but the formula does not mimic what recording did.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 334
Default ActiveCell.FormulaR1C1

Thanks for the tip...
Modified your suggestion to this and it works perfectly.

ActiveCell.Offset(Cnt1, 0).Formula = "=IF(" & TagNmeMe & "!A5="""",""""," &
TagNmeMe & "!A5)"

"FSt1" wrote:

hi
try....
ActiveCell.Formula = "=IF(Sheet1!A5="""","""",Sheet1!A5)"
Activecell.offset(9,0).formula = "=IF(Sheet2!A5="""","""",Sheet2!A5)"

regards
FSt1

"Rick" wrote:

I need help....
The following statement is being used in a do loop.

ActiveCell.FormulaR1C1 = "=IF(" & TagNmeMe & "!R[" & Cnt1 &
"]C[-1]="""",""""," & TagNmeMe & "!R[" & Cnt1 & "]C[-1])"

What I need it to do is this:
if(sheet1!A5="","",sheet1!a5) then 9 rows down paste this:
if(sheet2!A5="","",sheet2!a5)

Problem is when recording a macro the cnt1 changes from nothing to 9 then to
18 but the formula does not mimic what recording did.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default ActiveCell.FormulaR1C1

great
thanks for the feed back.

regards
FSt1

"Rick" wrote:

Thanks for the tip...
Modified your suggestion to this and it works perfectly.

ActiveCell.Offset(Cnt1, 0).Formula = "=IF(" & TagNmeMe & "!A5="""",""""," &
TagNmeMe & "!A5)"

"FSt1" wrote:

hi
try....
ActiveCell.Formula = "=IF(Sheet1!A5="""","""",Sheet1!A5)"
Activecell.offset(9,0).formula = "=IF(Sheet2!A5="""","""",Sheet2!A5)"

regards
FSt1

"Rick" wrote:

I need help....
The following statement is being used in a do loop.

ActiveCell.FormulaR1C1 = "=IF(" & TagNmeMe & "!R[" & Cnt1 &
"]C[-1]="""",""""," & TagNmeMe & "!R[" & Cnt1 & "]C[-1])"

What I need it to do is this:
if(sheet1!A5="","",sheet1!a5) then 9 rows down paste this:
if(sheet2!A5="","",sheet2!a5)

Problem is when recording a macro the cnt1 changes from nothing to 9 then to
18 but the formula does not mimic what recording did.

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
ActiveCell.FormulaR1C1 = "=SUM(R[-tellerteller]C:R[-1]C)" Jack Sons Excel Discussion (Misc queries) 5 September 29th 09 09:58 PM
Refer to ActiveCell ChrisR Excel Discussion (Misc queries) 5 September 29th 09 04:07 PM
If activecell.column = variable then activecell,offset (0,1) Battykoda via OfficeKB.com Excel Discussion (Misc queries) 1 October 2nd 07 08:05 PM
ActiveCell or ActiveSheet Launchnet Excel Worksheet Functions 1 July 20th 07 07:46 PM
reference to other worksheets in FormulaR1C1 Stefi Excel Discussion (Misc queries) 6 May 25th 05 09:01 AM


All times are GMT +1. The time now is 10:52 AM.

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"