#1   Report Post  
Junior Member
 
Posts: 2
Question IF Function Question

Hi

I Would like to know if it is possible to do something like this using IF:

From this:
=IF(A1*A2100;A1*A2;0)

To something like this:
=IF(A1*A2100;ResultFromTest;0)

Where "ResultFromTest" variable will be the result from the test "A1*A2", this way removing code redundancy.

Imagine how much a formula like this would be simplified:
From:
=IF(100-((A1*A2+(A3/A4))*A5/100)45;100-((A1*A2+(A3/A4))*A5/100);0)
To:
=IF(100-((A1*A2+(A3/A4))*A5/100)45;testResult;0)


Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default IF Function Question

Hi,

Am Thu, 19 Jul 2012 16:30:21 +0000 schrieb koeio:

I Would like to know if it is possible to do something like this using
IF:

From this:
=IF(A1*A2100;A1*A2;0)

To something like this:
=IF(A1*A2100;ResultFromTest;0)

Where "ResultFromTest" variable will be the result from the test
"A1*A2", this way removing code redundancy.


e.g. enter =A1*A2 in G1, select Name manager and give G1 the name
ResultFromTest. Then you can use the name in the formula. But you don't
have to do it with an If-Statement. Try:
=(A1*A2100)*ResultFromTest
or
=(ResultFromTest100)*ResultFromTest


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Junior Member
 
Posts: 2
Default

Thanks for your response

Your solution is not exactly what I want because you need to use other cells to implement.

Imagine you want to use tables with formulas like this:

Code:
Formula	X	Y
40	5	8
0	2	3
63	7	9
0	1	8
80	8	10
Where the cell Formula has this: "=IF([X]*[Y]30;[X]*[Y];0)"

Is there anyway to do this "=IF([X]*[Y]30;ResultFromTheLogicalTest;0)" without creating another column only for the "[X]*[Y]" calculation or use other cells?

Maybe some hidden IF parameter that does this: "=IF([X]*[Y]30;@result;0)" or other kind of function that I don't know.

Thanks
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
Function Question SteveDB1 Excel Worksheet Functions 8 March 16th 09 02:23 PM
Question on which function to use [email protected] Excel Worksheet Functions 2 February 7th 09 04:21 AM
User Function Question: Collect Condition in Dialog Box - But How toInsert into Function Equation? SteveM Excel Programming 1 January 3rd 08 03:45 PM
Function Question Jim Patterson Setting up and Configuration of Excel 2 December 6th 06 07:32 PM
Function question EG Excel Worksheet Functions 1 September 14th 06 07:22 PM


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