PC Review


Reply
Thread Tools Rate Thread

How do I force all functions within a cell or worksheet to bere-evaluated without doing it manually?

 
 
mike
Guest
Posts: n/a
 
      26th Mar 2008
I currently have a MAIN TABLE of values whose source of values can
come from 1 of 3 other SOURCE TABLES. The way it selects the SOURCE
table is based on a set of values in multiple cells.
(I am basically multiplexing 3 tables to 1 depending on some selection
criteria.)

Each entry in the MAIN TABLE contains a formula that picks which one
of the three SOURCE TABLES to get the data for the cells from.

Anyway, the fomulas in the MAIN TABLE only get executed when I select
a cell in the MAIN TABLE and press enter.

My question is:
Is there a way to get the formulas to evaluate automatically
whenever the selection criteria changes?

Thanks - mike


------------------------------------------------------------------------------------------------------------------------
Here is my code for the formula in the cells for the MAIN TABLE that
does the
multiplexing of the three other tables.
The selection variables are named cells called "A" "B" and "C"
------------------------------------------------------------------------------------------------------------------------

Function GET_WEIGHT(row, column)

'------ Use table 2 ------
GET_WEIGHT =
ActiveSheet.Evaluate("=OFFSET(CRITERIA_WEIGHT_TABLE_2," & row & ", " &
column & ", 1, 1)")
Exit Function
End If


'------ Use table 3 ------
If [A = 1] And [B = 0] And [C = 0] Then
GET_WEIGHT =
ActiveSheet.Evaluate("=OFFSET(CRITERIA_WEIGHT_TABLE_3," & row & ", " &
column & ", 1, 1)")


'------ Use table 1 ------
Else
GET_WEIGHT =
ActiveSheet.Evaluate("=OFFSET(CRITERIA_WEIGHT_TABLE_1," & row & ", " &
column & ", 1, 1)")
End If
End Function
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get evaluated value of worksheet names that do not refer to worksheet ranges? Dick Watson Microsoft Excel Programming 1 14th Dec 2008 03:56 AM
How do I force entry in multiple cell ranges in one worksheet CindyB Microsoft Excel Worksheet Functions 0 10th Jul 2008 06:08 PM
How cell ranges are handled by worksheet functions/row column matc =?Utf-8?B?TWFydGlu?= Microsoft Excel Programming 1 30th Sep 2005 01:09 PM
Cell protection while still maintaining worksheet functions =?Utf-8?B?SkpQ?= Microsoft Excel Worksheet Functions 1 20th Apr 2004 07:03 AM
Using VBA functions in Worksheet cell data validation Andrew Microsoft Excel Programming 7 26th Nov 2003 02:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:58 PM.