View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rob van Gelder[_4_] Rob van Gelder[_4_] is offline
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/