Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default any value to range.formula

Is there any advantage to setting a cell's contents using range.formula vs
range.value? The following yield identical results:


Sub place_it()
s = "=1+2"
Range("A1").Value = s
Range("A2").Formula = s
End Sub

--
Gary's Student
gsnu200705
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default any value to range.formula

Except for clarity of what you are doing, apparently not but I often like to
just leave the value

Sub place_it()
s = "=1+2"
'Range("A1").Value = s
Range("a1").Value = Application.Sum(1, 2)
'or
Range("a1").Value = 1 + 2
Range("A2").Formula = s

--
Don Guillett
SalesAid Software

"Gary''s Student" wrote in message
...
Is there any advantage to setting a cell's contents using range.formula vs
range.value? The following yield identical results:


Sub place_it()
s = "=1+2"
Range("A1").Value = s
Range("A2").Formula = s
End Sub

--
Gary's Student
gsnu200705



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
How do I enter formula sum(range+range)*0.15 sumif(range=3) tkw Excel Discussion (Misc queries) 2 October 1st 09 09:17 PM
conditional formula: sum a range if text present in another range NeedAdvice777 Excel Discussion (Misc queries) 10 August 29th 06 04:51 PM
formula to sort a range so that it matches the exact rows of a column that is outside that range? steveo Excel Discussion (Misc queries) 1 June 18th 06 02:05 AM
Macro to input formula in range based on another range Peter Atherton Excel Programming 0 October 9th 03 12:47 AM
Range.Formula and Range question using Excel Automation [email protected] Excel Programming 0 September 19th 03 04:53 AM


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