Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default ActiveCell.Formula Syntax

This will be a no-brainer for most, but I am stumped.

I am trying to have an ActiveCell.Formula that will spit out th
following:

The macro goes off to a cell that contains a mortgage number and the
stores the Cell Address as X.

Then it goes off to another cell and is supposed to say:
ActiveCell.Formula = "=Mortgage Number: " and then X, so that it refer
to that first active cell's address.

Here's what I have so far:
ActiveCell.FormulaR1C1 = "=""Mortgage Number: """

I've tried ActiveCell.FormulaR1C1 = X, and that displays the address o
the first cell as the contents, which is fine, but I need to includ
the constant "="MortgageNumber: "" in front of that.

Hope that makes sense.

Thx

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default ActiveCell.Formula Syntax

Not 100% sure I actually understand what you want.

I've commented out the first line, just in case you don't really want R1C1
style

Sub test()
' ActiveCell.FormulaR1C1 = _
"=""Mortgage Number: "" & " & _
Range("MortgageNo").Address(False, False, xlR1C1)
ActiveCell.Formula = _
"=""Mortgage Number: "" & " & _
Range("MortgageNo").Address(False, False)
End Sub


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Notorious_F.A.T " wrote in
message ...
This will be a no-brainer for most, but I am stumped.

I am trying to have an ActiveCell.Formula that will spit out the
following:

The macro goes off to a cell that contains a mortgage number and then
stores the Cell Address as X.

Then it goes off to another cell and is supposed to say:
ActiveCell.Formula = "=Mortgage Number: " and then X, so that it refers
to that first active cell's address.

Here's what I have so far:
ActiveCell.FormulaR1C1 = "=""Mortgage Number: """

I've tried ActiveCell.FormulaR1C1 = X, and that displays the address of
the first cell as the contents, which is fine, but I need to include
the constant "="MortgageNumber: "" in front of that.

Hope that makes sense.

Thx.


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default ActiveCell.Formula Syntax

If you are looking to find the cell with a MN, and you want to reference a
MN sheet, try this version

Dim oCell As Range

On Error Resume Next
Set oCell = Cells.Find("abc #1")
If Not oCell Is Nothing Then
ActiveCell.FormulaR1C1 = _
"='Mortgage Number'!" & _
oCell.Address(False, False)
End If
On Error GoTo 0

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Rob van Gelder" wrote in message
...
Not 100% sure I actually understand what you want.

I've commented out the first line, just in case you don't really want R1C1
style

Sub test()
' ActiveCell.FormulaR1C1 = _
"=""Mortgage Number: "" & " & _
Range("MortgageNo").Address(False, False, xlR1C1)
ActiveCell.Formula = _
"=""Mortgage Number: "" & " & _
Range("MortgageNo").Address(False, False)
End Sub


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Notorious_F.A.T " wrote

in
message ...
This will be a no-brainer for most, but I am stumped.

I am trying to have an ActiveCell.Formula that will spit out the
following:

The macro goes off to a cell that contains a mortgage number and then
stores the Cell Address as X.

Then it goes off to another cell and is supposed to say:
ActiveCell.Formula = "=Mortgage Number: " and then X, so that it refers
to that first active cell's address.

Here's what I have so far:
ActiveCell.FormulaR1C1 = "=""Mortgage Number: """

I've tried ActiveCell.FormulaR1C1 = X, and that displays the address of
the first cell as the contents, which is fine, but I need to include
the constant "="MortgageNumber: "" in front of that.

Hope that makes sense.

Thx.


---
Message posted from http://www.ExcelForum.com/





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
Need help with formula syntax DStrong Excel Discussion (Misc queries) 4 May 28th 09 03:21 AM
formula syntax. Babs Excel Discussion (Misc queries) 3 February 23rd 08 10:56 AM
If activecell.column = variable then activecell,offset (0,1) Battykoda via OfficeKB.com Excel Discussion (Misc queries) 1 October 2nd 07 08:05 PM
activecell.formula syntax Larry Levinson Excel Programming 4 December 23rd 03 01:33 PM
Formula with an ActiveCell Sok Hong Excel Programming 3 August 14th 03 08:24 AM


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