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: 171
Default Macro fails in different WB

Here's a macro that works perfectly in one of my workbooks:

Sub UnsplitNames()
Dim myCell As Range
For Each myCell In Range("E6", Range("E65536").End(xlUp))
myCell(1, 13).FormulaR1C1 = "=RC[-14] & "", "" & RC[-13]"
Next myCell
End Sub

Here's the same macro slightly hacked as added to a different WB:

Sub UnsplitNames()
Dim myCell As Range
For Each myCell In Range("A2", Range("A65536").End(xlUp))
myCell(1, 27).FormulaR1C1 = "=RC[-26] & "", "" & RC[-25]"
Next myCell
End Sub

...and it returns "=RC[-26] & "", "" & RC[-25]" in pretty blue text in every
cell.

Where did I go wrong, Mother darling?
--
Dave
Temping with Staffmark
in Rock Hill, SC
 
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
TEXT-formula in VB Macro fails [email protected] Excel Programming 4 August 3rd 06 04:13 PM
Macro fails in network Tom H[_2_] Excel Programming 1 May 25th 06 05:23 PM
Macro Suddenly Fails Bill Martin Excel Discussion (Misc queries) 2 September 16th 05 01:55 PM
Macro Fails to Run Correctly JK Excel Programming 3 August 20th 04 09:40 PM
Macro fails without VB help files Michael Miazga[_2_] Excel Programming 0 July 22nd 03 04:10 PM


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