Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Formulas Treated as Strings

I am trying to create a formula through code.

I am managing to do this but in the actual cell the formula is not being
calculated. It is being treated as text.
Ex.
In cell B1 i have a value of 500
I want to create a formula showing 500 *5 in cell b2.

in cell b2 I am calling a function ChgVal(B1). The result in B2 is correctly
showing =500*5 but it is not showing the value 2500.
I also tried using the VALUE command but to no avail.
Can anyone pls help?
Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Excel Formulas Treated as Strings

Range("B2").formula = "=5*Chgval(B1)"

"cjes" wrote:

I am trying to create a formula through code.

I am managing to do this but in the actual cell the formula is not being
calculated. It is being treated as text.
Ex.
In cell B1 i have a value of 500
I want to create a formula showing 500 *5 in cell b2.

in cell b2 I am calling a function ChgVal(B1). The result in B2 is correctly
showing =500*5 but it is not showing the value 2500.
I also tried using the VALUE command but to no avail.
Can anyone pls help?
Thanks

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
Formulas are becoming text strings FrustratedinBoston Excel Discussion (Misc queries) 2 March 10th 09 12:37 PM
sheet formulas and strings Robert Bencomo Excel Worksheet Functions 4 June 1st 08 06:49 AM
sheet formulas and strings Robert Bencomo Excel Programming 1 June 1st 08 04:20 AM
Some of my SSN's are being treated as formulas Gina K Excel Discussion (Misc queries) 12 October 12th 07 08:19 PM
Formulas not evaluated, Formulas treated as strings Bob Sullentrup Excel Discussion (Misc queries) 0 November 27th 06 08:01 PM


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