LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using VBA to create cell formulas

Using the following code causes an error 1004

Public Function ReturnRef(s As Worksheet, r As Range) As Strin
Dim sheet As Strin
Dim address As Strin
sheet = s.Name & "!
address = r.address(ReferenceStyle:=xlR1C1
ReturnReference = sheet & addres
End Function ' Return for Example "SheetName!R1C1

Public Sub FromTakeoffToEstimate(Takeoff As Worksheet, Estimate As Worksheet) ' Drawing to Esitmat
' Setting up Equations for Estimat
Estimate.Cells(9, 2).FormulaR1C1 = "= " & ReturnRef(Takeoff, Takeoff.Cells(2, 4))
....
End Su

I was wondering if anyone can see a problem with this code or has another way to solve this proble

 
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
CREATE AND IF FORMULAS fyrefox Excel Worksheet Functions 3 April 22nd 07 04:50 PM
create if formulas Lost in Excel Land Excel Worksheet Functions 1 June 30th 06 10:46 PM
create multiple formulas in 1 cell anam_cara Excel Worksheet Functions 2 May 11th 05 05:56 AM
How to create Multiple Conditional Formulas in a single cell? Maxfx Excel Discussion (Misc queries) 2 February 1st 05 02:26 PM
Create macro for formulas celia Excel Programming 0 November 11th 03 06:58 AM


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