LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Extending a macro

Dave,

You need to double up internal diuble-quotes to get them to work:

myCell(1, 13)..FormulaR1C1 = "=RC[-14] & "", "" & RC[-13]"

The best way to code formulas is to get the formula working in a cell, then start the macro
recorder, select the cell, press F2, press Enter, and stop the recorder.

HTH,
Bernie
MS Excel MVP


"Dave Birley" wrote in message
...
Now, just to get difficult, I decided to identify a surname, firstname pair
and do something similar:

Sub TryToo()
Dim myCell As Range
For Each myCell In Range("E8546", Range("E65536").End(xlUp))
If myCell.Value < myCell(2, 1).Value Then
myCell(1, 13).FormulaR1C1 = "=RC[-14] & ", " & RC[-13]"
End If
Next myCell
End Sub

If I run it with just "=RC[-14]", it delivers the surname value. However I
get the error when I try to concatenate the first name field RC[-13].

Where am I going wrong, mother darling? {{Old English music hall song}}
--
Dave
Temping with Staffmark
in Rock Hill, SC


"Bernie Deitrick" wrote:

Dave,

You're welcome. Glad to hear that you got it to work...

Bernie
MS Excel MVP


All good and wonderful!

Thanks a million.
--






 
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
extending columns Bob New Users to Excel 3 December 24th 06 11:12 PM
Extending VLOOKUP Krish Excel Worksheet Functions 2 September 5th 06 07:26 AM
Extending Row() Colin Hayes Excel Worksheet Functions 4 December 20th 05 11:41 PM
extending selection Flip Excel Discussion (Misc queries) 5 April 5th 05 11:17 AM
extending dates Sanford Lefkowitz Excel Discussion (Misc queries) 2 February 22nd 05 09:30 PM


All times are GMT +1. The time now is 04:38 AM.

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"