How can I find values between two numbers in excel when we apply COUNTIFS formula.
For example if I have a column in which there are three values failed, passed & canceled & the rows are 1 to 9000. How can I find no. of successful in 1000 to 4999?
I am applying formula to the column & its not giving me the exact results. I did find it for the first question which was less than 1000 via
=COUNTIFS(Crowdfunding!$G:$G,Crowdfunding!$D:$D,"<1000")
How I can find the rest?
Less than 1000
1000 to 4999
5000 to 9999
10000 to 14999
15000 to 19999
20000 to 24999
25000 to 29999
30000 to 34999
35000 to 39999
40000 to 44999
45000 to 49999
Greater than or equal to 50000
What can I put in the formula?
Related
I have the following function that automatically sums 3 rows together for a specified number of cells determined by D2:
=BYCOL((INDEX($1:$11,{4;5;10},SEQUENCE(1,D2,COLUMN(I:I)))),LAMBDA(x,SUM(x)))
The values in each column in rows 4 and 5 I wish to add together and I'd like to subtract the result from the cell value for row 10. I have a workaround which sets the values in row 10 to negative but I'd prefer them to be positive numbers.
I tried the following, but unfortunately it doesn't work:
=BYCOL((INDEX($1:$11,{4;5;10},SEQUENCE(1,D2,COLUMN(I:I)))),LAMBDA(x,y,z,SUM((x+y)-z)))
Example of expected result:
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sept
Revenue
10000
12000
14000
16000
11000
20000
21000
22000
24000
Extra Revenue
1000
2000
3000
1000
2000
2000
1000
1500
2500
Costs
500
1000
2000
500
1000
1000
750
1000
1000
Profit/Loss
10500
13000
15000
16500
12000
21000
21250
22500
25500
To make it match with your data:
=BYCOL((INDEX($1:$11,{2;3;4},SEQUENCE(1,Q2,COLUMN(B:B)))),LAMBDA(x,INDEX(x,1)+INDEX(x,2)-INDEX(x,3)))
where I've put a suitable value (9) into Q2.
EDIT
This would have been tidier
=BYCOL((INDEX($1:$11,{2;3;4},SEQUENCE(1,Q2,COLUMN(B:B)))),LAMBDA(x,SUMPRODUCT(x,{1;1;-1})))
Different approach - but in my eyes the formula is more readable for what you want to achieve:
The red part is named 'rowHeader', the blue part 'data'
=LET(revenue,FILTER(data,rowHeader="Revenue"),
extraRevenue,FILTER(data,rowHeader="extra Revenue"),
costs,FILTER(data,rowHeader="Costs"),
revenue + extraRevenue-costs)
UPDATE:
You can define the ranges also within the LET-formula
=LET(rowHeader,A6:A15,
data,MAKEARRAY(10,B2,LAMBDA(r,c,INDEX(6:15,r,c+1))),
revenue,FILTER(data,rowHeader="Revenue"),
extraRevenue,FILTER(data,rowHeader="extra Revenue"),
costs,FILTER(data,rowHeader="Costs"),
revenue+extraRevenue-costs)
B2 contains the number of months that should be returned.
I am really lost on below table somehow and couldn't find a way to get out. I need to input one value to a cell and other cell needs to check, apart its fractions to get the result in a singe cell.
Can you please look up and assist me on this matter ?
Here are the conditions:
If value between; price;
0 – 1000 100
1001 – 2000 145
2001 – 3000 170
3001 – 4000 200
4001 – 5000 230
5001 – 7500 280
7501 – 10000 320
10001 – 20000 per 1000NT or fraction thereof 15
20001 – 30000per 1000NT or fraction thereof 10
30001 – 40000per 1000NT or fraction thereof 5
40001 – 50000per 1000NT or fraction thereof 5
Over 50001additionalper 1000NT or fraction thereof 5
My solution so far:
I8 CELL = =IF(E11>=10000;320;)
J8 CELL = =ROUNDUP(SUM(E11;-10000)/1000;0)
J9 CELL = =IF(AND(ROUNDUP(SUM(E11;-10000)/1000;0)>=1;ROUNDUP(SUM(E11;-10000)/1000;0)<=10);J8*75)
J10 CELL = =IF(AND(J8>=11;J8<=20);J8*65)
I am trying to enter a certain decimal value from 100.00 - 0.0001 into a cell and have the same decimal place be reflected in a column. I'm basically trying to make a one hundreds increment of one to ten thousands increment of 1 in a column, but have the place value dictated a number I enter into a cell.
Here is my mess, I cant get the formatting to link between the cells.
5000 0.00240 0.00140
5000 0.00230 0.00130
5000 0.00220 0.00120
5000 0.00210 0.00110
5000 0.00200 0.00100
5000 0.00190 0.00090
5000 0.00180 0.00080
5000 0.00070 0.00070
5000 0.00160 0.00060
5000 0.00150 0.00050
5000 0.00140 0.00040
5000 0.00130 0.00030
5000 0.00120 0.00020
5000 0.00110 0.00010
Entry 0.00100 5000 0.00100 0.00000
5000 0.00000 -0.00010
5000 0.00000 -0.00020
5000 -0.00100 -0.00030
5000 -0.00200 -0.00040
5000 -0.00300 -0.00050
5000 -0.00400 -0.00060
5000 -0.00500 -0.00070
5000 -0.00600 -0.00080
5000 -0.00700 -0.00090
support 5000 -0.00800 -0.00100
5000 -0.00900 -0.00110
5000 -0.01000 -0.00120
5000 -0.01100 -0.00130
To control the decimal place, look up the POWER function. As an example: =POWER(10,1-Column()) will be 1 in Column A (100), 0.1 in Column B (10-1), 0.01 in Column C (10-2), etc.
(As a second example: =POWER(2,Column()) will be 2 in Column A (21), 4 in Column B (22), 8 in Column C (23), etc)
At the moment my formula looks for a LARGE number in column D, which is greater than number in K4, however if the number in K4 is greater than the LARGEST number in col D I get an error #NUM!
=IF(AND($K$4="",$D$5=""),"Not Reported",IF(AND($K$4="",$D$5<>""),"Missing DATA",IF(AND($K$4<>"",$D$5<>""),INDEX($E$5:$E$23,MATCH((SMALL($D$5:$D$23,COUNTIF($D$5:$D$23,""&$K$4)+1)),$D$5:$D$23,0),1))*1-$K$4/SUM(LARGE($D$5:$D$23,COUNTIF($D$5:$D$23,">"&$K$4)+1)+SMALL($D$5:$D$23,COUNTIF($D$5:$D$23,""&$K$4)+1))))+INDEX($E$5:$E$23,MATCH("P98",$A$5:$A$23,0)))))
Can you advise how to alter it, so if the above occurs, instead of taking the number from K4 into consideration, simply replace it with whatever the LARGEST number in col D is and finish the rest of calculations [embedded in the formula]. Appreciate your help.
PS. IFERROR is not an option (it doesn't solve this)
SAMPLE DATA [where the error occurs]:
VALUE OF $K$4
250000
COLUMN A
PERCENTILE
P10
P20
P30
P40
P50
P60
P70
P80
P90
P91
P92
P93
P94
P95
P96
P97
P98
P99
P100
COLUMN D
NUMBER
3500
4096.79
10000
13500
15000
18299.46
25000
39000
50000
50000
50000
50000
200000
200000
200000
200000
200000
200000
200000
COLUMN E
VOLUME
2
2
1
2
1
2
2
1
2
0
0
0
1
0
0
0
0
0
0
I can't give an exact answer since I don't have exact detail about what you're trying to do, however it sounds like you want to do something like this:
=max(k4, d:d)
So: If K4 is the same are bigger than the largest number in Column D, then use K4. Otherwise, use the biggest number in Column D.
More Information:
Office.com : MAX Function
MAX vs MAXA vs LARGE and MIN vs MINA vs SMALL Functions in Excel
So, this works for me:
=IF($J$4="",F27,(IF(J4>=MAX(B5:B23),(INDEX($C$5:$C$23,MATCH((SMALL($B$5:$B$23,COUNTIF($B$5:$B$23,"<"&IF(J4>MAX(B5:B23),MAX(B5:B23),J4))+1)),$B$5:$B$23,0),1))*(1-((IF(J4>MAX(B5:B23),MAX(B5:B23),J4))/SUM(LARGE($B$5:$B$23,COUNTIF($B$5:$B$23,">"&(IF(J4>MAX(B5:B23),MAX(B5:B23),J4)))+1)+SMALL($B$5:$B$23,COUNTIF($B$5:$B$23,"<"&(IF(J4>MAX(B5:B23),MAX(B5:B23),J4)))+1))))+INDEX($C$5:$C$23,MATCH("P98",$A$5:$A$23,0),1),IF(J4<=MIN(B5:B23),INDEX($C$5:$C$23,MATCH((SMALL($B$5:$B$23,COUNTIF($B$5:$B$23,">"&IF(J4<MIN(B5:B23),MIN(B5:B23),J4))+1)),$B$5:$B$23,0),1))*(1-((IF(J4<MIN(B5:B23),MIN(B5:B23),J4))/SUM(LARGE($B$5:$B$23,COUNTIF($B$5:$B$23,"<"&(IF(J4<MIN(B5:B23),MIN(B5:B23),J4)))+1)+SMALL($B$5:$B$23,COUNTIF($B$5:$B$23,">"&(IF(J4<MIN(B5:B23),MIN(B5:B23),J4)))+1))))+INDEX($C$5:$C$23,MATCH("P98",$A$5:$A$23,0),1),(INDEX($C$5:$C$23,MATCH((SMALL($B$5:$B$23,COUNTIF($B$5:$B$23,"<"&$J$4)+1)),$B$5:$B$23,0),1))*(1-($J$4/SUM(LARGE($B$5:$B$23,COUNTIF($B$5:$B$23,">"&$J$4)+1)+SMALL($B$5:$B$23,COUNTIF($B$5:$B$23,"<"&$J$4)+1))))+INDEX($C$5:$C$23,MATCH("P98",$A$5:$A$23,0),1)))))
I had to also hedge against the K4 (or J4) value being <MIN(B5:B23)
I am trying to write a vlookup formula that pulls the fee value from another sheet if the amount is between the Min and Max shown below: Any Help is appreciate.
My Code:
=IFERROR(IF(ISBLANK(A2),"",VLOOKUP(A2,Sheet2!$A$2:$S$70,3,FALSE)),"")
Min Max Fee
1 5000000 20
5000001 10000000 30
10000001 20000000 40
20000001 30000000 50
Just change the forth criterion to TRUE:
=IFERROR(IF(A2="","",VLOOKUP(A2,Sheet2!$A$2:$S$70,3,TRUE)),"")
As long as the data is sorted on Column A in Ascending Order, the Max is not needed. The VLOOKUP will find where it fits.