Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Function not Evaluating to a Result

Hi,

A colleague of mine has a spreadsheet containing a number of formulas which
reference cells in another sheet within the same workbook, so the cells
contain for example
='Reference Data'!A3

He populates the sheet using VBA code inserting the functions into the
appropriate cells, and on initial creation this works fine and all the cells
show the correct result.

i.e. If the Reference Data sheet at cell A3 contains "Fred Bloggs" then
"Fred Bloggs" is displayed in the cell.

However, if he edits the cell function to change say the !A3 to !A4, then
instead of the cell displaying the new result, it just displays the function,
i.e. ='Reference Data'!A4
This happens even if he changes it back to !A3

We've both been racking our brains trying to figure what the heck is going
on as we cannot see why this would happen, so I'm asking the Experts out
there if they might know why, and what we can do to stop it behaving so oddly.

Many thanks in advance.

David
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,203
Default Excel Function not Evaluating to a Result

The cell has become formatted as text. Change the formatting to 'General'.

He can probably make the change in his code; a simplistic example of how to
do that would be:

where he now has something like this setting a formula:
Range("G2").Formula = "=SomeSheetName!B55"

add a line before that, as:
Range("G2").NumberFormat = "General"
Range("G2").Formula = "=SomeSheetName!B55"





"David Cook" wrote:

Hi,

A colleague of mine has a spreadsheet containing a number of formulas which
reference cells in another sheet within the same workbook, so the cells
contain for example
='Reference Data'!A3

He populates the sheet using VBA code inserting the functions into the
appropriate cells, and on initial creation this works fine and all the cells
show the correct result.

i.e. If the Reference Data sheet at cell A3 contains "Fred Bloggs" then
"Fred Bloggs" is displayed in the cell.

However, if he edits the cell function to change say the !A3 to !A4, then
instead of the cell displaying the new result, it just displays the function,
i.e. ='Reference Data'!A4
This happens even if he changes it back to !A3

We've both been racking our brains trying to figure what the heck is going
on as we cannot see why this would happen, so I'm asking the Experts out
there if they might know why, and what we can do to stop it behaving so oddly.

Many thanks in advance.

David

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
Match function not evaluating correctly Robert Flanagan Excel Discussion (Misc queries) 0 February 2nd 10 10:13 PM
Function not evaluating DazzaData Excel Discussion (Misc queries) 2 February 20th 08 07:36 PM
Evaluating multiple ranges for a count function JustMe602 Excel Worksheet Functions 4 October 7th 05 02:37 AM
Evaluating Today() function only once in a worksheet BW Excel Worksheet Functions 4 October 5th 05 10:32 PM
Moving in the worksheet during an evaluating function Tushar Mehta Excel Programming 3 March 22nd 05 01:31 PM


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