Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default paste formula without workbook reference

when working out the details I often "perfect a formula in one workbook and
then paste it into another. However, I can not find a wyanot to paste the
formula with ref. to the first notebook. I then have to spend more time
deleting references. Its a bit of a hassle.

Is there a way not to paste the ref. to the first workbook?

Thanks

Tom


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default paste formula without workbook reference

Maybe something like:

Workbooks("book2.xls").Worksheets("sheet1").Range( "c4").Formula _
= Workbooks("book1.xls").Worksheets("sheet1").Range( "e6").Formula





Thomas Wright wrote:

when working out the details I often "perfect a formula in one workbook and
then paste it into another. However, I can not find a wyanot to paste the
formula with ref. to the first notebook. I then have to spend more time
deleting references. Its a bit of a hassle.

Is there a way not to paste the ref. to the first workbook?

Thanks

Tom


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default paste formula without workbook reference


this one will copy the formula 'absolute',change to Formular1c1 for
relative copies.

In this context I mean following with absolute..
if you copy
from test.xls sheet1 a3 =sheet3!b6
to demo.xls sheet2 b6

you'll get =sheet3!b6

relative copy would get you =sheet3!c9

if you select more than 1 cell the destiantion.selection is
automatically resized.. neat!!!


Sub GetFormula()
Dim r As Range
On Error Resume Next
'turn off alerts in case sheet references are invalid
Application.DisplayAlerts = False
Set r = Application.InputBox("Select cell with Formula", Type:=8)

If Not r Is Nothing Then
Selection.Resize(r.Rows.Count, r.Columns.Count).Formula = r.Formula
End If
Application.DisplayAlerts = True

End Sub

have fun...



--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Thomas Wright wrote :

when working out the details I often "perfect a formula in one
workbook and then paste it into another. However, I can not find a
wyanot to paste the formula with ref. to the first notebook. I then
have to spend more time deleting references. Its a bit of a hassle.

Is there a way not to paste the ref. to the first workbook?

Thanks

Tom

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
Copy formula from one workbook to another without reference to 1st Scott Excel Discussion (Misc queries) 3 January 7th 09 05:30 AM
COPY/PASTE/FORMULA GIVES ABSOLUTE REFERENCE Janis Excel Discussion (Misc queries) 2 September 5th 07 08:25 PM
copy formula to new workbook without [REFERENCE] Clayman Excel Discussion (Misc queries) 3 August 8th 07 03:52 PM
workbook/cell reference w/ formula waladd Excel Worksheet Functions 4 February 17th 07 03:16 PM
how to paste formula but reference a fixed cell HR Excel Discussion (Misc queries) 3 April 7th 06 04:27 AM


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