I would like to put in a number as a total, say B2. Then put in a negative number under it in B3, and subtract B3 form B2 and B2 shows the total. If i put in 10 in B2 and -5 in B3 and then B2 would show 5.
This would be an example of circular reference and therefore not possible. The result of the calling cell depends on the value of the referenced cell which depends on the value of the calling cell. It can never come to a resolution.
You can instead do one of two options. Change B2 into a formula:
=10+B3
This way B2 will show the value 5 by adding the negative -5 from B3 to 10.
Else, if you need it to be more dynamic, then add the 10 value to some other cell. For instance:
B1: 10, B2: =B1+B3, B3: -5
With the above B2 will show the value 5. You can then later change the B1 and/or B3 values to manipulate B2. For instance, if you change B1 to 5, and B3 remains the same, then B2 will show 0.
Related
I'm trying to build a basic financial tools sheet for myself. Here's a problem:
Let's make Cell B1 30 times of cell A1 (B1 = 30*A1). However I'm not sure when A1 is a known value or B1 is.
What I need is when I fill 100 in A1, B1 will be filled with 3000 (30xA1) automatically, and if I fill 60 in B1, A1 will be filled 2 (1/30 of B1).
Is it possible?
Suppose, in Cell A1 of Sheet2 I use this formula.
=AVERAGE(Sheet1!A1:A10)
Now when I drag down from A1 to A3
A2 will be =AVERAGE(Sheet1!A2:A11)
A3 will be =AVERAGE(Sheet1!A3:A12)
However I want it in a transpose way. Such as,
A2 will be =AVERAGE(Sheet1!B1:B10)
A3 will be =AVERAGE(Sheet1!C1:C10)
Means, I will use drag down rather than dragging to side, yet I'll get the answer in transpose way, more specifically, I want to change column index rather than changing row index by dragging a formula down.
Is there any way to do that?
Thanks in advance.
One way is to use this formula in Sheet2 A1 and copy down
=AVERAGE(OFFSET(Sheet1!$A$1,,ROW()-1,10))
As you drag it down, ROW()-1 increases by 1 and this is the column offset from A1.
In A1, ROW()-1 returns 0 so there is no offset, but as you go down this increases by 1 and this is the column offset from A1 - so in row 2 this becomes B1 etc.
The 10 indicates the size of the relevant range to be averaged.
In A1 enter:
=AVERAGE(INDEX(Sheet1!$A$1:$Z$10,1,ROW()):INDEX(Sheet1!$A$1:$Z$10,10,ROW()))
and copy downward.
If you need more than 26 items, increase the Z in the formula.
For example, in the cell B3 : =MEDIAN(A1:A3), and that formule works all cells from B3 to Bend, but not work for B1 and B2, I tried write =IFERROR(MEDIAN(A-1,A1),(MEDIAN(A$1,A1)) but the excel not allow nagetive number.
And also why =MEDIAN("A"&"1:A3") not work? How can I split A and 3 ?
The formula below would work in B3, B2 and B1 as well as all cell below B3.
=MEDIAN(INDIRECT(ADDRESS(MAX(ROW()-2,1),1)&":"&ADDRESS(ROW(),1)))
It splits the "A from the 3", as you say, with the ADDRESS function and then converts the result of that to a cell reference using INDIRECT.
See the following image:
In cell B5 I have =(AND(IF(B2=0,SUM(2+2),0),IF(B3="",SUM(2+2),0))) and it is saying TRUE, instead of calculating and giving me 4. I don't know why.
What I want is, if I enter 0 for Apple in cell B2 and leave cell B3 for Orange blank (must be blank or an error will appear), only then I want cell B5 to calculate 2+2=4. Now, if I enter 0 for Orange in cell B3 and leave cell B2 for Apple blank (must be blank or an error will appear), then I want cell B5 to have a value of 0.
Change to:
=IF(AND(B2=0, B3=""), SUM(2,2),0)
So, in your case, you will be looking to input:
=IF(AND(B2 = "", B3 = ""), "Error", IF(AND(B2=0, B3=""), (1+(K17*4))*K31),0))
Originally, you were not returning a sum, you were returning a boolean (TRUE or FALSE) from the =AND() statement. Since =AND() was on the outside, you were not returning what you wanted. If you want to return a value, you must use the =IF() statement in Excel. Also, you do not need to do =SUM(2+2), you can just calculate 2+2. Furthermore, you do not need to calculate =SUM(1+(K17*4))*K31) because all of your elementary operations are taken care of in your formula inside the =SUM() function.
Using the below function works;
=IF(AND(B2=0;B3="");SUM(2+2);IF(AND(B2="";B3=0);0;"Error Message"))
In this case, if B2 is 0, and B3 is blank, you'll get your formula (SUM(2+2)).
If B2 is blank, and B3 = 0, you'll get value 0.
In all other cases (e.g. Both blank), you will get the error message.
I want to change cell value according to my sum means if i give total 2000 in "A5" than value change automatic in cell range A1 to A4.
It's confusing to answer your question without knowing more.
Assuming you are working in Excel, if you have the following numbers
A1 A2 A3 A4 A5
5 6 7 8 1000
you can set the following formula for A1, A2, etc.
=IF($A$5=2000,*value that you want cells to read, "")
Essentially if the condition on cell A5 is met, in this case reaching 2000, you will change the value of cell A1 - A4 to a specified amount. If it doesn't reach 2000, you will keep the original value.
You could have formulas in A1 to A4 as percentages of A5,
for example,
A1: =0.1*A5
A2: =0.2*A5
A3: =0.3*A5
A4: =0.4*A5