Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default formula using vba does not work ..

Hi,

In a spreadsheet I insert a very simple formula :

Range("I1").Select
ActiveCell.FormulaR1C1 = "=COUNTIF(A:A,""*"")"
Range("I2").Select

Cell I1 gives an error #NAME?, but when selecting this cell, put
cursor after last char and press enter, the right value appears ! So i
did NOT modify it only place cursor and hit enter ...

Any thoughts ?

-ben
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default formula using vba does not work ..

Use ActiveCell.Formula rather than ActiveCell.FormulaR1C1. E.g,.


ActiveCell.Formula = "=COUNTIF(A:A,""*"")"

Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Thu, 27 Nov 2008 08:06:12 -0800 (PST), wrote:

Range("I1").Select
ActiveCell.FormulaR1C1 = "=COUNTIF(A:A,""*"")"
Range("I2").Select

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
I Need get work this formula ytayta555 Excel Worksheet Functions 4 August 1st 08 01:31 PM
MY FORMULA WON'T WORK.. WHY?? Eclaires Excel Worksheet Functions 2 July 12th 07 11:28 AM
Cant quite get this formula to work: CarolineHedges Excel Worksheet Functions 2 July 31st 06 10:58 AM
A search for $ in a formula use to work now it does not work JuneJuly Excel Discussion (Misc queries) 2 November 30th 05 10:13 PM
How does this formula work KB Excel Worksheet Functions 3 March 25th 05 02:52 PM


All times are GMT +1. The time now is 05:11 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"