inbedded functions in functions

B

Brad Gover

I am trying to write an If/then function that checks the
value in one cell and if its value is greater than 6000
then curser box moves to another cell. Winwedge program
puts in raw data in columns A and B. My functional
statement would be in cell location c1. When the value in
b1 is greater than 6000, I want the curser box to go to
cell A1 and allow winwedge program to refill cells A1 and
B1 again. When the condition in C1 is false, then the
logical statement would do nothing.

What I have tried so far is =if(b1>6000,goto(a1),,)
Unfortunately, it dosn't work!

Any ideas? Appriciate your help!
 
N

Norman Harker

Hi Brad!

I'm afraid you can't do this with a function.

The details of capabilities of functions and formulas are based on:

170787 XL: Custom Functions Can't Change Microsoft Excel Environment
http://support.microsoft.com/default.aspx?scid=kb;en-us;170787

A Function or User Defined Function called by a formula in a worksheet
cell cannot change the environment of Microsoft Excel. This means that
such a function cannot do any of the following:

Ø Insert, delete, or format cells on the spreadsheet.
Ø Change another cell's value.
Ø Move, rename, delete, or add sheets to a workbook.
Ø Change any of the environment options, such as calculation
mode or screen views.
Ø Add names to a workbook.
Ø Set properties or execute most methods.

The purpose of user-defined functions is to allow the user to create a
custom function that is not included in the functions that ship with
Microsoft Excel. These functions, as with built-in functions also
cannot change the environment.

Functions can perform a calculation that returns either a value or
text to the cell that they are entered in. Any environmental changes
should be made either directly or through the use of a Visual Basic
subroutine.


--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
Public Holidays Monday: Central African Republic (National Day of
Prayer); El Salvador (Balance Day); Guatemala (Army Day); Israel (Rosh
Hodesh Tammuz); Sudan (National Salvation Revolution Day); Ukraine
(Constitution Day); Zaire (Independence Day).
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top