Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default Excel 2000 - copying/pasting formula for validation purposes

Is it possible to copy a formula from a cell and paste it as text?

I am writing spreadsheet validation documents which must show the formula
used in each calculated cell eg: =SUM(B8:B15) is written as SUM(B8:B15).

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default Excel 2000 - copying/pasting formula for validation purposes

Hi
Place a single quote ' in the cells, before you paste.
That will force the entry to be text.
--

Regards
Roger Govier

"Silena K-K" wrote in message
...
Is it possible to copy a formula from a cell and paste it as text?

I am writing spreadsheet validation documents which must show the formula
used in each calculated cell eg: =SUM(B8:B15) is written as SUM(B8:B15).

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default Excel 2000 - copying/pasting formula for validation purposes

Hi Roger

It worked if I placed the single quote ' at the beginning of the formula
after I had pasted it into another cell but not before.

Do you know if I can add the single quote ' automatically - some type of
add/replace function(??) at the beginning of the formula?

Regards, Silena

"Roger Govier" wrote:

Hi
Place a single quote ' in the cells, before you paste.
That will force the entry to be text.
--

Regards
Roger Govier

"Silena K-K" wrote in message
...
Is it possible to copy a formula from a cell and paste it as text?

I am writing spreadsheet validation documents which must show the formula
used in each calculated cell eg: =SUM(B8:B15) is written as SUM(B8:B15).

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Excel 2000 - copying/pasting formula for validation purposes

Rather than copy the formula you could use a UDF to show the formula.

Function ShowFormula(Cell)
Application.Volatile
ShowFormula = "No Formula"
If Cell.HasFormula Then ShowFormula = Mid(Cell.Formula, 2)
End Function

Usage is: =ShowFormula(cellref) will return SUM(B8:B15)


Gord Dibben MS Excel MVP

On Thu, 29 Nov 2007 13:11:00 -0800, Silena K-K
wrote:

Is it possible to copy a formula from a cell and paste it as text?

I am writing spreadsheet validation documents which must show the formula
used in each calculated cell eg: =SUM(B8:B15) is written as SUM(B8:B15).

Thanks


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default Excel 2000 - copying/pasting formula for validation purposes

Hi

Sorry about that.

The following short bit of code will create a list of the formulae in column
A, in column B in text form.
The code is set to run from row 1 to 50, change to suit your requirement.
Also, alter the column letters to suit.

Sub changeformulatotext()
Dim i As Long
For i = 1 To 50
Cells(i, "B") = "'" & Cells(i, "A").Formula
Next
End Sub


Copy the above code.
press alt+F11 to bring up the Visual Basic Editor
InsertModule
In the white pane that appears, paste the code you have copied
Alt+F11 to return to Excel
Alt+F8 to bring up macros, highlight the macro name and click Run
--

Regards
Roger Govier

"Silena K-K" wrote in message
...
Hi Roger

It worked if I placed the single quote ' at the beginning of the formula
after I had pasted it into another cell but not before.

Do you know if I can add the single quote ' automatically - some type of
add/replace function(??) at the beginning of the formula?

Regards, Silena

"Roger Govier" wrote:

Hi
Place a single quote ' in the cells, before you paste.
That will force the entry to be text.
--

Regards
Roger Govier

"Silena K-K" wrote in message
...
Is it possible to copy a formula from a cell and paste it as text?

I am writing spreadsheet validation documents which must show the
formula
used in each calculated cell eg: =SUM(B8:B15) is written as
SUM(B8:B15).

Thanks





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default Excel 2000 - copying/pasting formula for validation purposes

Hi Roger

Thank you and have a wonderful Christmas/NY. Regards, Silena

"Roger Govier" wrote:

Hi

Sorry about that.

The following short bit of code will create a list of the formulae in column
A, in column B in text form.
The code is set to run from row 1 to 50, change to suit your requirement.
Also, alter the column letters to suit.

Sub changeformulatotext()
Dim i As Long
For i = 1 To 50
Cells(i, "B") = "'" & Cells(i, "A").Formula
Next
End Sub


Copy the above code.
press alt+F11 to bring up the Visual Basic Editor
InsertModule
In the white pane that appears, paste the code you have copied
Alt+F11 to return to Excel
Alt+F8 to bring up macros, highlight the macro name and click Run
--

Regards
Roger Govier

"Silena K-K" wrote in message
...
Hi Roger

It worked if I placed the single quote ' at the beginning of the formula
after I had pasted it into another cell but not before.

Do you know if I can add the single quote ' automatically - some type of
add/replace function(??) at the beginning of the formula?

Regards, Silena

"Roger Govier" wrote:

Hi
Place a single quote ' in the cells, before you paste.
That will force the entry to be text.
--

Regards
Roger Govier

"Silena K-K" wrote in message
...
Is it possible to copy a formula from a cell and paste it as text?

I am writing spreadsheet validation documents which must show the
formula
used in each calculated cell eg: =SUM(B8:B15) is written as
SUM(B8:B15).

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
Passwords and Encryption for Excel 2003 for Validation Purposes. Antonio K Osborn Excel Discussion (Misc queries) 1 September 7th 06 09:33 PM
copying and pasting a formula William Excel Worksheet Functions 2 November 22nd 05 12:25 AM
Trouble copying and pasting a formula Julie P. Excel Discussion (Misc queries) 6 March 4th 05 04:11 AM
Copying & Pasting Formula Connie Martin Excel Discussion (Misc queries) 2 March 3rd 05 05:11 PM
Trouble copying and pasting a formula Julie P. Excel Worksheet Functions 4 March 3rd 05 03:16 AM


All times are GMT +1. The time now is 04:22 PM.

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"