Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
extending columns | New Users to Excel | |||
Extending VLOOKUP | Excel Worksheet Functions | |||
Extending Row() | Excel Worksheet Functions | |||
extending selection | Excel Discussion (Misc queries) | |||
extending dates | Excel Discussion (Misc queries) |