Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default macro converts formula using imbeded literals

I created a macro. In the macro was a formula. When I run the formula it puts
single quotes around the cell position.

ActiveCell.FormulaR1C1 = "= (g2*(h2/100)*I2)/360"

In the Cell -- See g2-h2-I2
=('g2'*('h2'/100)*'I2')/360

What gives?

James
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default macro converts formula using imbeded literals

Don't use the FormulaR1C1 property. Use Formula instead.

ActiveCell.Formula = "= (g2*(h2/100)*I2)/360"




"jmealhouse" wrote in
message
...
I created a macro. In the macro was a formula. When I run the
formula it puts
single quotes around the cell position.

ActiveCell.FormulaR1C1 = "= (g2*(h2/100)*I2)/360"

In the Cell -- See g2-h2-I2
=('g2'*('h2'/100)*'I2')/360

What gives?

James



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default macro converts formula using imbeded literals

Hi jmealhouse

try, Formula

ActiveCell.Formula = "= (g2*(h2/100)*I2)/360"

--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"jmealhouse" wrote:

I created a macro. In the macro was a formula. When I run the formula it puts
single quotes around the cell position.

ActiveCell.FormulaR1C1 = "= (g2*(h2/100)*I2)/360"

In the Cell -- See g2-h2-I2
=('g2'*('h2'/100)*'I2')/360

What gives?

James

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default macro converts formula using imbeded literals

That worked!
Thank You

James

"chijanzen" wrote:

Hi jmealhouse

try, Formula

ActiveCell.Formula = "= (g2*(h2/100)*I2)/360"

--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"jmealhouse" wrote:

I created a macro. In the macro was a formula. When I run the formula it puts
single quotes around the cell position.

ActiveCell.FormulaR1C1 = "= (g2*(h2/100)*I2)/360"

In the Cell -- See g2-h2-I2
=('g2'*('h2'/100)*'I2')/360

What gives?

James

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
Formula Disappears, converts to a value [email protected] Excel Worksheet Functions 3 July 10th 07 11:19 PM
Macro that converts xls to csv Carl Excel Worksheet Functions 0 January 26th 07 04:45 PM
Excel converts formula to number noyb New Users to Excel 9 June 22nd 06 04:41 PM
Does anyone have an excel macro that converts states to 2 digit f. Bryghtfalcon Excel Programming 1 April 19th 05 06:29 PM
Help - This macro converts my text numbers. jer101[_6_] Excel Programming 1 June 18th 04 02:42 AM


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