Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Temporary Storage in IF function

I have a function like this..
=IF(expr 0 , expr , " ")

Now if my expr is again a big formula.. then is there any way of avoiding
repeating it as the second argument.. ie any temporary variable for storage
is available? like this...

=IF ((a=long_expr) 0 , a , "");
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Temporary Storage in IF function

If it is just one cell, then use a cell somewhere else to store the
value, eg put your expression in X1 then your formula can be:

=IF(X10,X1,"")

If you are doing this on a column of cells, then just copy the
expression down the X column (often referred to as a helper column),
then copy your formula down.

Hope this helps.

Pete

On Apr 16, 12:40 pm, Chinni Krishna Reddy <Chinni Krishna
wrote:
I have a function like this..
=IF(expr 0 , expr , " ")

Now if my expr is again a big formula.. then is there any way of avoiding
repeating it as the second argument.. ie any temporary variable for storage
is available? like this...

=IF ((a=long_expr) 0 , a , "");



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,081
Default Temporary Storage in IF function

Unfortunately, you will have to have the formula stated twice, either within
the IF() function or somewhere else in the sheet.

However, if you are testing for an error, Excel 2007 has a new IfError()
function that allows you state your formula but once:

=iferror(long formula, value if formula errors)

If the formula works, IFERROR() gives the formula's results. If it errors,
IFERROR() returns the "value of formula errors"


"Chinni Krishna Reddy" wrote:

I have a function like this..
=IF(expr 0 , expr , " ")

Now if my expr is again a big formula.. then is there any way of avoiding
repeating it as the second argument.. ie any temporary variable for storage
is available? like this...

=IF ((a=long_expr) 0 , a , "");

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Temporary Storage in IF function

You might also look at Laurent Longre's morefunc.xll add-in. The SETV and
GETV functions appear to be applicable to what you want to do.

http://xcell05.free.fr/

Or maybe you could just use
=MAX(expr, 0)
and use a custom number format like
0;-0;;
to suppress displaying the 0 if you do not want it displayed? The cell will
still have a value of 0 - so this may affect your dependent formulas.


"Chinni Krishna Reddy" wrote:

I have a function like this..
=IF(expr 0 , expr , " ")

Now if my expr is again a big formula.. then is there any way of avoiding
repeating it as the second argument.. ie any temporary variable for storage
is available? like this...

=IF ((a=long_expr) 0 , a , "");

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default Temporary Storage in IF function

You might try using 2 cells.

Say A1 is
=expr

And, in the result cell:
=IF(A10,A1,"")
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"Chinni Krishna Reddy" <Chinni Krishna
wrote in message ...
I have a function like this..
=IF(expr 0 , expr , " ")

Now if my expr is again a big formula.. then is there any way of avoiding
repeating it as the second argument.. ie any temporary variable for
storage
is available? like this...

=IF ((a=long_expr) 0 , a , "");



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
Data Storage gregory.barrett Excel Discussion (Misc queries) 3 March 30th 06 10:23 PM
CHANGE STORAGE DRIVES margaret@deere Excel Discussion (Misc queries) 3 March 12th 06 10:20 PM
horseracing results database storage hodgy Setting up and Configuration of Excel 0 February 22nd 06 11:27 AM
newbie needs help with data storage mrclox Excel Discussion (Misc queries) 0 November 22nd 05 09:52 PM
data storage from one worksheet to another coal_miner Excel Worksheet Functions 3 May 3rd 05 04:42 PM


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

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"