I have been looking for an answer to this problem. I imagine it's fairly simple, but I think the problem is I don't really know exactly how to search it.
Basically, I want to change the reference in the formula by updating the column and row cells.
So, since the column and row cells say Q & 8, the formula updates to pull from Q8.
If I were to change the column to R, it would pull from R8 and equal 20.
Surely this is straightforward.. right? Please??
Thanks!!
=INDIRECT(ADDRESS(P12,COLUMN(INDIRECT(P11&"1"))))
For explaination how does it work please read about functions INDIRECT, ADDRESS and COLUMN
I'm looking at a legacy spreadsheet and I cannot for the life of me figure out how this formula works. I'm by no means an excel wizard.
The spreadsheet tracks billing for a company for members of staff. On each row, the user puts an ID, the amount, and formula then puts the figure under a column for a given staff member.
And the formula:
=IF(A2="Foo",A2="Foo")*(SUM(B2))
I would have done this:
=IF(A2="Foo", B2, 0)
Which appears to have the same effect.
Any insight?
=IF(A2="Foo",A2="Foo") is equivalent to =A2="Foo". It results in a boolean value, which is used by the multiplication operation as 1 or 0.
I don't see any reason to express it that way instead of the more concise and intuitive formula that you offer.
The original formula has a lot of excess calculations going on in it. It can be simplified as you mentioned, which is what most people would do. Some alternate forms might be:
=(A2="Foo")*B2
The above formula you would place in D2 and copy down and then you would have to redo the String comparisson for column E then again for F. If you used the following formula you could place it in D2 and copy it down and to the right as needed without having to adjust the formula.
=($A2=D$1)*$B2
In more common terms it would look like
=IF($A2=D$1,$B2,0)
I encountered "64 levels of nesting" issue while working on my formula. Is there any way to simplify this formula? This formula worked fine up from 10 to 500 (G:G) but once over 510 something, it encountered "64 levels of nesting" issue. I found some solutions that involved lookup and match-index, but I can't see where/how to implement it here.
Formula is in cell B3:
=IF(B2<=$G$2,B2+($E$2*B2),IF(AND(B2>$G$2,B2<=$G$3),B2+($E$3*B2),IF(AND(B2>$G$3,B2<=$G$4),B2+($E$4*B2),IF(AND(B2>$G$4,B2<=$G$5),B2+($E$5*B2),IF(AND(B2>$G$5,B2<=$G$6),B2+($E$6*B2),IF(AND(B2>$G$6,B2<=$G$7),B2+($E$7*B2),IF(AND(B2>$G$7,B2<=$G$8),B2+($E$8*B2),IF(AND(B2>$G$8,B2<=$G$9),B2+($E$9*B2),IF(AND(B2>$G$9,B2<=$G$10),B2+($E$10*B2),IF(AND(B2>$G$10,B2<=$G$11),B2+($E$11*B2),IF(AND(B2>$G$11,B2<=$G$12),B2+($E$12*B2),IF(AND(B2>$G$12,B2<=$G$13),B2+($E$13*B2),IF(AND(B2>$G$13,B2<=$G$14),B2+($E$14*B2),IF(AND(B2>$G$14,B2<=$G$15),B2+($E$15*B2),IF(AND(B2>$G$15,B2<=$G$16),B2+($E$16*B2),IF(AND(B2>$G$16,B2<=$G$17),B2+($E$17*B2),IF(AND(B2>$G$17,B2<=$G$18),B2+($E$18*B2),IF(AND(B2>$G$18,B2<=$G$19),B2+($E$19*B2),IF(AND(B2>$G$19,B2<=$G$20),B2+($E$20*B2),IF(AND(B2>$G$20,B2<=$G$21),B2+($E$21*B2),IF(AND(B2>$G$21,B2<=$G$22),B2+($E$22*B2),IF(AND(B2>$G$22,B2<=$G$23),B2+($E$23*B2),IF(AND(B2>$G$23,B2<=$G$24),B2+($E$24*B2),IF(AND(B2>$G$24,B2<=$G$25),B2+($E$25*B2),IF(AND(B2>$G$25,B2<=$G$26),B2+($E$26*B2))))))))))))))))))))))))))
Cells $A2:$A26 & cells $E2:$E26 are variable. Cells $D2:$D26 are just my indicator. Others are constant value.
Cells $B2:$B26 will calculate the formula $A2+$A2* percentage. The percentage is based on the value which is in cells $E2:$E26. The value is then determine by the value in cells $A2:$A26.
Formula in cells $B2:$B26 are as previous formula dragged down.
Example:
If the cost is 50. The value of percentage will be taken from cell $E$7. In this case is 10 thus returning the value in $B$6 to $A6+$A6*10=55
Please refer to ss 2.
excel screenshot 2
If you reach the nesting limit that nearly always means there's an easier way....
You should be able to do this much more simply with a lookup type formula, e.g.
=B2+B2*IF(B2<G$2,E$2,INDEX(E$3:E$26,MATCH(TRUE,INDEX(B2>G$2:G$25,0),0))
This finds the first value in column G which is > B2 and then gets the required value from the next row in column E
The only thing this formula doesn't do is impose an upper limit on B2 (yours is the G26 value 250). If that's an issue you can just add an extra IF to cater for that
You might want to rework your tables but an INDEX/MATCH with a relative lookup on ascending data will return the correct percentage.
=b2*index(e2:e26, match(b2, g2:g26, 1))
Not 100% sure I understand your formula/intent. I think I got it...if not please clarify.
add another column that does the math in column H. enter this formula and drag down.
=($B$2+(E2*$B$2))
in cell B3 enter this formula
=VLOOKUP(ROUNDUP(B2,-1),G:H,2,FALSE)
I am new to excel and I am hoping if someone could help me with this challenge.
What I am trying to achieve is use a continuation formula from cell above if the cell to the left of current cell is not empty.
As you can see in the attached picture, the formula is copied down the row but the left cell is empty, I only want excel to apply formula if left cell is not empty,
I will really appreciate if you can help me please.
You can use ISBLANK and IF function together to check whether a cell is blank or not and give the value you want.
=IF(ISBLANK(A1), "", <put your original formula here>)
It is checking whether cell A1 is blank, then give nothing if it is true. If it is false (there is something in the cell), it will evaluate 3rd argument. So put your formula there.
You may want to look at some beginners tutorial first so that you can learn more about excel functions systematically.
check
https://support.office.com/en-us/article/IF-function-69aed7c9-4e8a-4755-a9bc-aa8bbff73be2 and
https://support.office.com/en-us/article/IS-functions-0f2d7971-6019-40a0-a171-f2d869135665
to know more the IF adn ISBLANK function
Use =ISBLANK() to reliably test if a cell is actually empty.
The following is a table showing the results of applying various functions to a cell to test if is blank or is empty.
Column H contains the actual values being tested. Column I shows what is actually in the cells in column H. Columns D:G apply various formulas to test the contents of H.
Note that, somewhat a misnomer, =ISBLANK is the reliable way to test for an empty cell. =COUNTBLANK or IF(CELL.Value = "") are good ways to test for a blank cell.
I expanded on the example given by Colin Legg here
I hope i have used the term NullString appropriately,other users please feel free to correct me on that.
Anyone can help me with this problem?
I would like a way to write a formula z=f(x,y) and tell excel to calculate the value of that formula for different sets of the couple (x,y).
Or I could do this but I don't know how:
CELL 1:x^2+y^2,x=A1,y=A2
CELL 2:x^2+y^2,x=B1,y=B2
CELL 3:x^2+y^2,x=C1,y=C2
etc...
How can I do?
Thanks in advance for your precious help
I'm not sure I'm entirely clear on what you need, so here's my response to what I think you're asking. Why not put all x's in one column, y's in the next column, and then have the function(s) in the subsequent columns? Then you can input the formula in the function column and drag it down. If you need to have the results appear together in the resultant (x,y) format, consider concatenating the next column. Something like this:
You can write:
In A1 first value of X
In A2 First value of Y
In A3 =the formula(X,Y) In a way Excel can calculate it like in your question:
=A1^2+A2^2
In B3 -->F3 for example write X values
In A4 -->A10 for example write Y values
Select A3:F10 Clickon Data Table in Data Tab
In Row Input Cell write A1
In Column Input Cell write A2
Click Ok
You will have all the values in an Array
Thank you all for your quick support and help. It is a nice community.
I solved the problem using data table, as suggested.
You can find a link to the picture showing what I wanted to get.
Data Table