Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Pasting formula as text

I am trying to past the formula from a cell into another
cell as text. That is if cell A1 has a formula which is
=Sum(A2:A10). I want to be able to past the text version
of this to say B1. So B1 will say 'Sum(A2:A10). How do
you do this?

I have been trying:

Range("B1") = Range("A1").formula

But this is not giving me what I want.

THanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default Pasting formula as text

ExcelMonkey

one way:

Range("B1") = "'" & Range("A1").Formula

Regards

Trevor


"ExcelMonkey" wrote in message
...
I am trying to past the formula from a cell into another
cell as text. That is if cell A1 has a formula which is
=Sum(A2:A10). I want to be able to past the text version
of this to say B1. So B1 will say 'Sum(A2:A10). How do
you do this?

I have been trying:

Range("B1") = Range("A1").formula

But this is not giving me what I want.

THanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Pasting formula as text

Or

Range("B1").Value = Right(Range("A1").Formula, Len(Range("A1").Formula) - 1)



"ExcelMonkey" wrote:

I am trying to past the formula from a cell into another
cell as text. That is if cell A1 has a formula which is
=Sum(A2:A10). I want to be able to past the text version
of this to say B1. So B1 will say 'Sum(A2:A10). How do
you do this?

I have been trying:

Range("B1") = Range("A1").formula

But this is not giving me what I want.

THanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Pasting formula as text

Thanks


-----Original Message-----
ExcelMonkey

one way:

Range("B1") = "'" & Range("A1").Formula

Regards

Trevor


"ExcelMonkey"

wrote in message
...
I am trying to past the formula from a cell into another
cell as text. That is if cell A1 has a formula which

is
=Sum(A2:A10). I want to be able to past the text

version
of this to say B1. So B1 will say 'Sum(A2:A10). How do
you do this?

I have been trying:

Range("B1") = Range("A1").formula

But this is not giving me what I want.

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
Pasting unformatted text Erik Wikström Excel Discussion (Misc queries) 0 September 19th 07 01:57 PM
losing text from text box when pasting selection to word rallyworker Excel Discussion (Misc queries) 0 April 13th 07 08:44 AM
Pasting #-# as text and not a date lcshrm Excel Discussion (Misc queries) 5 March 16th 07 03:12 AM
Pasting Text Lisa Excel Discussion (Misc queries) 1 May 10th 06 07:35 PM
Pasting text wnfisba Excel Discussion (Misc queries) 1 October 20th 05 07:23 PM


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