Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Location: LI, NY
Posts: 1
Default Strange Thing Happening

I am using a macro to enter formulas into several different cells in a workbook.
The formulas are the same except for the cell references.

Range("A22").Select
ActiveCell.FormulaR1C1 = "=IF(ROUND(F22,3)=ROUND(F21,3),A21,IF(ROUND(F22,3) =ROUND(F23,3),A7&K29,L31))"

This is done 5 times during the same execution, with the first 3 resulting as expected, but the result of the last two is:
=IF(ROUND('F22',3)=ROUND('F21',3),'A21',IF(ROUND(' F22',3)=ROUND('F23',3),'A7'&'K29','L31'))

The program added the singe quote mark ' around all the cell references.

I have tried several fixes, including copying and pasting, writing them by hand, and inserting and deleting the working lines, to no avail.

I can do a "Replace" command on the page and the single quote marks are removed and the formulas then respond as expected.

Help
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
Strange thing happened with TOC RoxSn Excel Discussion (Misc queries) 1 March 11th 05 08:43 PM
Strange behaviour Edgar Thoemmes Excel Worksheet Functions 1 February 8th 05 03:20 PM
Validation List and VLookup are ackting strange Jasper Excel Worksheet Functions 1 January 24th 05 01:49 PM
Strange Results with Autofilter Joyce Excel Discussion (Misc queries) 1 January 17th 05 02:42 AM
Strange Error Message Michael Windmeier Excel Discussion (Misc queries) 0 December 3rd 04 08:18 AM


All times are GMT +1. The time now is 12:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"