Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dow Dow is offline
external usenet poster
 
Posts: 31
Default Macro to Insert Changes the Formula

I searched for the answer but I could not find it on any previous
posts. I am sure it is an easy one and I am probably missing
something obvious -

I have a Macro that inserts a formula. It references another
worksheet in the same workbook.

Range("B1").Select
ActiveCell.FormulaR1C1 = "=COUNTIFS(Operations!
F:F,""AWP"",'Operations'!G:G,""<=20"")"

After the Macro is run this is the formula in cell B1:

=COUNTIFS('Operations'!F:(F),"AWP",'Operations'!G: (G),"<=20")

Why does it convert the range to F:(F)? And how can I fix it?

The worksheet name will change and its location could also possibly
change.

Thank you to anyone who helps. It is greatly appreciated.
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
INsert Formula via Macro franciz Excel Programming 2 September 3rd 08 07:49 PM
Insert a Formula with a Macro Ed Excel Discussion (Misc queries) 2 October 22nd 06 11:37 PM
Macro to insert formula nobbyknownowt Excel Worksheet Functions 3 June 28th 06 05:16 PM
macro to insert into a formula Todd Excel Worksheet Functions 1 March 8th 06 04:55 PM
Insert macro into formula Paul Excel Worksheet Functions 1 May 12th 05 08:25 PM


All times are GMT +1. The time now is 10:24 PM.

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

About Us

"It's about Microsoft Excel"