Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default calculate formula of another cell

I need for one cell to use the formula inputted on another cell under a
certain condition.
Here is the 1st formula:
=IF(AND($C$6=75%),'Dept acc'!H69,IF(AND($C$6=50%),'Dept
acc'!H65,IF(AND($C$6=25%),'Dept acc'!H61,'Dept acc'!H73)))

In the dept acc H69 cell is the following formula:
=IF(AND(B69<=1802.25),1,IF(AND(B69=1802.26,B69<=3 602.25),2,
IF(AND(B69=3602.26,B69<=5402.25),3, IF(AND(B69=5402.26,B69<=7202.25),4,
IF(AND(B69=7202.26),5)))))

I need for the computer to calculate the formula in H69 cell when that $C$6
is 75% and another formula when $C$6 is 50% etc..
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default calculate formula of another cell

The AND function computes 2 or more things that have to be true to produce
true. You have only one thing - e.g. AND($C$6=75%) and what???
For example if I want to have a three cells be 3, 4, 5 I could say
=AND(A1=3,B1=4,C1=5) that would mean that cells A1 must be 3, B1 must be 4
and C1 must be 5 for the condition to be true. Your formula makes no sense.
=IF(AND(1=1), true, false) You are AND'ing nothing.

Tyro

"sweetpeach" wrote in message
...
I need for one cell to use the formula inputted on another cell under a
certain condition.
Here is the 1st formula:
=IF(AND($C$6=75%),'Dept acc'!H69,IF(AND($C$6=50%),'Dept
acc'!H65,IF(AND($C$6=25%),'Dept acc'!H61,'Dept acc'!H73)))

In the dept acc H69 cell is the following formula:
=IF(AND(B69<=1802.25),1,IF(AND(B69=1802.26,B69<=3 602.25),2,
IF(AND(B69=3602.26,B69<=5402.25),3, IF(AND(B69=5402.26,B69<=7202.25),4,
IF(AND(B69=7202.26),5)))))

I need for the computer to calculate the formula in H69 cell when that
$C$6
is 75% and another formula when $C$6 is 50% etc..



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default calculate formula of another cell

Before I deal with your problem, let's look at the basic formula
constructions - the first formula should be reduced to something like:

=IF($C$6=75%,'Dept acc'!H69,IF($C$6=50%,'Dept acc'!H65,IF($C$6=25%,'Dept
acc'!H61,'Dept acc'!H73)))

and the second formula:

=IF(B69<=1802.25,1,IF(AND(B69=1802.26,B69<=3602.2 5),2,
IF(AND(B69=3602.26,B69<=5402.25),3, IF(AND(B69=5402.26,B69<=7202.25),4,
IF(B69=7202.26,5)))))

better yet would be to replace the multiple IF's with one
VLOOKUP(B69,Table,2) where Table is a two column range looking like this:
0 1
1802.25 2
3602.25 3
5402.25 4
7202.25 5

Now to your problem a formula can't control which cells calculate. You
could do that with VBA if you put the spreadsheet in manual recalc mode.

This is certainly a non-standard use of the spreadsheet, maybe it would be
better to have other formulas use the results of different cells based on the
result in C6. If it is 75% use the results in X1, if 50% use the results in
X2, and so on.

--
Cheers,
Shane Devenshire


"sweetpeach" wrote:

I need for one cell to use the formula inputted on another cell under a
certain condition.
Here is the 1st formula:
=IF(AND($C$6=75%),'Dept acc'!H69,IF(AND($C$6=50%),'Dept
acc'!H65,IF(AND($C$6=25%),'Dept acc'!H61,'Dept acc'!H73)))

In the dept acc H69 cell is the following formula:
=IF(AND(B69<=1802.25),1,IF(AND(B69=1802.26,B69<=3 602.25),2,
IF(AND(B69=3602.26,B69<=5402.25),3, IF(AND(B69=5402.26,B69<=7202.25),4,
IF(AND(B69=7202.26),5)))))

I need for the computer to calculate the formula in H69 cell when that $C$6
is 75% and another formula when $C$6 is 50% etc..

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
Need Formula to calculate n*'cell value' where n is any integer Elliott-DECA Excel Discussion (Misc queries) 1 December 20th 07 09:39 PM
Can you calculate a formula in the same cell where you enter the d Tikki Excel Discussion (Misc queries) 3 December 8th 06 08:12 PM
formula won't calculate unless I click cell steel1960 Excel Worksheet Functions 2 September 8th 06 09:50 PM
On excel, my formula will not calculate and add info into cell Kara D. Sanders Excel Worksheet Functions 3 May 14th 06 08:54 PM
X IN A CELL TO CALCULATE A FORMULA JUSTIN Excel Worksheet Functions 1 January 3rd 05 11:08 PM


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