I have, on a worksheet, 3 values (C1, C2, C3). C2 and C3 are constant and will not change, but I want C4 to update depending on the value of C1 (anywhere from 1 to 50).
Normally I know how to do these things, but I haven't figured this out. Here's what I want to do for this particular case:
I want C4 to be equal to C3 plus 2.02% * (C2) for every C1... meaning that if C1 = 1 then C4 is equal to C3 * 1.0202.
My problem is for higher than 1, I didn't find a way to "recursively" call the cell value, this is what I have so far:
=IF( $C$1 = 1; C3; C3 * (1+C2))
Obliviously this isn't working and I haven't found a function that'll do what I want. Is there a mathematical way of doing this?
Thanks,
I've tried to make it as clear as possible, don't hesitate to ask me if it's not clear!
EDIT:
Here what the result would look like
C1 = 1: 0.625
C1 = 2: 0.625 * 1.0202 = 0.637625
C1 = 3: 0.637625 * 1.0202 = 0.650505025
C1 = 4: 0.650505025 * 1.0202 = 0.663645226505
...
I want to use the previous result to calculate the new one
What about using the power operator :
= C3 * (1+C2)^C1
This multiplies C3 with (1+C2) for C1 times.
This is how compound interest or a growth rate is applied to grow a value.
Are you thinking of =c3 + c2*c1?
Nope, you're thinking of =c3 * (1+c2)^c1 as #peladao posted.
Related
Here is what I did
=VLOOKUP(M3,P2:Q23,2,FALSE)+VLOOKUP(N3,P2:Q23,2,FALSE)
I want to sum the values with just one formula and not repeat it
Im using Excel Online
I tried =XLOOKUP(M2:N2,P3:P23,Q3:Q23) but I get a value error,does anyone know how to do this ?
Perhaps you can try in Excel Online:
• Formula used in cell C3
=SUM(SCAN(0,M3:N3,LAMBDA(x,y,VLOOKUP(y,P3:Q12,2,0))))
Works for me in Google Sheet as well
• Formula used in cell C3
=SUM(SCAN(0,M3:N3,LAMBDA(x,y,VLOOKUP(y,P3:Q12,2,0))))
This works if, and only if, you are certain the M2 and N2 will not be the same value:
=SUMPRODUCT( ( (P2:P23=M2) + (P2:P23=N2) ) * Q2:Q23 )
If you want N2 = M2 to be valid and result in the number added twice, then:
=SUMPRODUCT( (P2:P23=M2) * Q2:Q23 ) + SUMPRODUCT( (P2:P23=N2) * Q2:Q23 )
But then you are back to repeating the formula.
I used M2 and N2 for the lookup values; your post uses row references 2 and 3 sometimes interchangeably.
The follow Formula give me the correct Value:
=SUM(SUMIFS('POS Data'!$G:$G,'POS Data'!$B:$B,{"5","10","11"}))
However I require part of the criteria to be taken from a cell value. eg
=SUM(SUMIFS('POS Data'!$G:$G,'POS Data'!$B:$B,E1))
E1 cell value = {"5","10","11"}
However the formula gives a 0 value. What am I missing? Why is it not recognizing that E1 is that value?
The solution used was as follows:
=SUMPRODUCT(SUMIFS('POS Data'!$G:$G,'POS Data'!$B:$B,E1:G1))
E1 = 5
F1 = 10
G1 = 11
That you #scottCraner
Assuming your import cell with your array is in E1, You have to change it from {"5","10","11"} to 5,10,11 in the cell value
=SUM(SUMIFS(G:G,B:B,TRANSPOSE(FILTERXML("<x><y>"&SUBSTITUTE(E1,",","</y><y>")&"</y></x>","//y"))))
So I have normalized some data in Excel to the range of 0-1, using the following formula
(B6-MIN(B$6:B$370))/(MAX(B$6:B$370)-MIN(B$6:B$370))
what I would like to know is how would one go about doing the inverse of the formula above or any other method of reverting back to an de-normalized state.
From what you've posted, the cell B6 is being normalized against the column B. So to de-normalize, it would just be
=B6
If you want to take some arbitrary value between 0 and 1, (e.g., 0.3), you'd just invert the formula algebraically:
= 0.3 * (MAX(B$6:B$370) - MIN(B$6:B$370)) + MIN(B$6:B$370)
To do this with a cell (e.g., D9), it would be the same, just using the cell number instead of a value:
= D9 * (MAX(B$6:B$370) - MIN(B$6:B$370)) + MIN(B$6:B$370)
I am trying to build a complicated spreadsheet and I need a statement to do the following:
If C2=R2 and D2 is < T2 then U2, if D2 is >T but T3 but < T4 then U4 if D2 is > T4 but < T5 then U5, if D2 is > T5 but < T6 then U6 BUT if C2 does not equal R2 then S8
I think it needs to be some sort of IF statement, but i am tearing my hair out.
UPDATE:
Vicky's formula almost worked. I have jigged it a bit and it now looks like this.
=IF(C6=$R$3,IF(D6<=0.99,$U$2,IF(AND(D6>0.99,D6<=4.99),$U$3,IF(AND(D6>4.99,D6<=14.99),$U$4,IF(AND(D6>14.99,D3<=29.99),$U$5,IF(AND(D6>29.99,D6<99.99),$U$6,""))))),$S$8)
It all works fine until you change the value in cell D6 to say £45 when it still picks up the figure in cell U5. What do I need to tweak to fix that?
Here you go:
=IF(C2=R2, IF(D2<T2, U2, IF(AND(D2>T3, D2<T4), U4, IF(AND(D2>T4, D2<T5), U5, IF(AND(D2>T5, D2<T6), U6, "")))), S8)
Note that I am assuming that "if D2 is >T but T3 but < T4" is a typo for "if D2 is >T3 but < T4" and that if C2=R2 but D2 is not in any of the other ranges you just want the cell left blank.
IF(AND(D6>14.99,D3<=29.99)
you've got a reference to D3 here not D6.
Yes, this would normally be expressed as an IF statement.
You could write this as one long complicated set of nested IF statements in your spreadsheet or you could write it in VBA. The VBA option would be easier to comprehend and therefore easier to maintain, but it would be a slightly steeper learning curve.
Try throwing in an ARRAY if you are trying to settle items in the same row.
What you're after is a VLOOKUP, combined with an IF
=IF(C2=R2, VLOOKUP(D2, T2:U6, 2, TRUE), S8)
This says:
If C2 = R2
find the first row in T2:U6 where the value in the first column is greater than D2
return the value in the second column from that row
otherwise return S8.
Which is equivalent to your initial criteria.
my requirement as follows:
if a5 = 'a' then b5 = 1
if a5 = 'b' then b5 = 2
if a5 = 'c' then b5 = 3
if a5 = 'd' then b5 = 4
if a5 = 'e' then b5 = 5
else enter correct letter
total no. of conditions are more than 5 as of now and then i need to put default msg for this like 'ENTER CORRECT LETTER '
Excel's IF statement is IF(condition, trueValue, FalseValue). You can nest them to accomplish if-else chains via IF(condition1, trueValue, IF(elseCondition, elseTrue, defaultValue))
Formulas are entered in a cell in Excel by starting the cell's contents with an equals sign.
Conditions of equality in Excel use single equals comparison, not double equals.
There are other ways to approach the problem; if you had a range defined of valid entries, for example, MATCH would be useful for finding the position of a matching cell within that range.
=IF(A5="a",1,
IF(A5="b",2,
IF(A5="c",3,
IF(A5="d",4,
IF(A5="e",5,"Enter Correct Letter")))))
Insert this into cell B5
=IF(OR(CODE(A5)<97,CODE(A5)>101),"ENTER CORRECT LETTER",CODE(A5)-96)
you can see example implimentation in this sheet. Let me know if it helps or you need further explanation.
=IF(ISERROR(FIND(A5,"ABCDE")),"Enter correct letter",CODE(A5)-64)
This will work with as many letters as you want.