Check if column values are increasing - excel

I got an Excel sheet like:
A B C
1 L11 6
1 L21 10
1 L31 20
2 L12 5
2 L22 15
2 L32 23
I want to make a formula to check if each consecutive 3 values in column C are increasing. How can I do it?
I've tried to group by but was invain

If the value 6 is in C1, then you could put the following formula in D3: =AND(C3>C2, C2>C1)
Copy it down. If it's TRUE, it means that each consecutive 3 values in column C are increasing.

If you want to quantify the trend here I am using a simple formula to calculate the slope for the 3 numbers using the values in y axis.
Formula
=SLOPE(N2:N4,{1;2;3})

Related

Select next higher number in array based on a minimum criteria

I have the following Excel spreadsheet:
A B C D
1 0 0.99 Minimum: 6
2 1 0.99 Input: 3
3 2 2.99 Result: 4.99
4 3 2.99
5 4 4.99
6 5 4.99
7 6 7.99
8 7 7.99
9 8 9.99
10 9 9.99
The formula in cell D3 is:
=LARGE(B$1:B$10,COUNTIF(B$1:B$10,">"&D2))
This formula selects the next highest number in the array in
Column B based on the input in cell D3.
For example:
If the input in cell D3 is 3 it will select
4.99 instead of 2.99.
All this works perfectly with the formula in cell D3.
However, now I want to insert a minimum criteria into this system
in cell D1.
For example: If the minimum is 6 the formula in cell D3 should notice it
and select 7.99 instead of 4.99.
Do you have any idea how to solve this issue?
Is there a way to do it without using an array formula?
You can use COUNTIFS to include multiple criteria, instead of your COUNTIF.
So in Cell D3 put the formula below:
=LARGE(B$1:B$10,COUNTIFS(B$1:B$10,">"&D2,B$1:B$10,">"&D1))
It means that the formula is searching for 2 criterias:
Cells Value is larger than value in Cell D2 (Input).
Cells Value is larger than value in Cell D1 (Minimum).
Using INDEX/MATCH you could restrict the range that's looked at, although I feel there's a better way:
=LARGE(INDEX($B:$B,MATCH($D$1,$A:$A,0)):INDEX($B:$B,COUNTA($A:$A)),COUNTIF(INDEX($B:$B,MATCH($D$1,$A:$A,0)):INDEX($B:$B,COUNTA($A:$A)),">"&$D$2))
You could place the INDEX/MATCH into a named range to make the formula shorter.

Summing a set of values based on cell content and row position

In the below table rows 2,3 and 4 have some details of a sporting event.
Range A2:C4 has a set of squad numbers and range D2:F4 has the details of who scored goals.
A B C D E F
1 Squad # Scorers
2 1 3 6 2 8 3
3 3 6 7 6 1
4 1 5 6 7 2 4
As an example squad # 6 has scored 8 goals based on the values equivalent position in the Squad section and relative to the Scorers range.
What formula will give me this total value and the equivalent total values for all squad numbers like the table below?
Some cells will be empty like F3.
1 9
3 14
5 2
6 8
7 0
A simple SUMPRODUCT function should take care of this.
=SUMPRODUCT($D$2:$F$4, --($A$2:$C$4=H2))
Fill down as necessary.
        
With only 3 games, the simplest way that I can see to do this would be to use 4 SUMIFS statements, as follows [assumes that your results data is in columns A & B, starting at row 5 and moving down; A5:A12 would hold the IDs for the different squads, and this formula would go in B5 and be copied down]:
=SUMIFS($D$2:$F$2,$A$2:$C$2,A5)+SUMIFS($D$3:$F$3,$A$3:$C$3,A5)+SUMIFS($D$4:$F$4,$A$4:$C$4,A5)
What it does is sum columns D:F, for row 1, row 2, and row 3, based on the fact that columns A:C for those rows match the appropriate squad ID.
This would be possible with an arguably shorter but more complex Array Formula, but with the data as you've presented it, I feel this is the clearest method.

Contruct cumulative sum for duplicates

I am looking for formula in Excel to construct cumulative sum for the duplicates.
Item Value Cumulative sum
-----------------------------
A 3 3
A1 4 4
A1 7 11
A1 5 16
B1 20 20
B1 4 24
C 6 6
D 10 10
E 8 8
E 7 15
The table given shows the cumulative for the duplicates in Column 1(Item).
I need excel formula to construct this for my calculations.
Break problems like these down step-by-step.
(Assume your data are in A1:C11 (col C is empty except for the header).)
To calculate a cumulative sum, you just add the current value in col B to the previous value in col C. This is simply =C1+B2 in C2, =C2+B3 in C3, etc.
To evaluate whether you are in the same group of Item, you can simply test whether A2=A1, A3=A2, etc.
To reset your cumulative sum when the group changes, you can use an IF() function. In (2), you have a logical condition. In (1), you have an operation to perform if the condition is true. If the condition is not true, you want to reset the cumulative sum, which is simply the value of col B in the current row.
So to put it together (in C2):
=IF(A2=A1, C1+B2, B2)
Then fill down.

I WANT CALCULATE SUM IN EXCEL

I HAVE A QUESTION ABOUT SUM IN EXCEL:
I have many rows in excel.
I want to calculate sum of each row in one formula
for example
A B C D E
2 3 5 6 8 24
4 5 6 8 9 32
BUT do not USE separate formula FOR EVER CALCULATION (FOR EXAMPLE =sum A1:D1)
CAN I USE WITH ONE FORMULA TO CALCULATE SUM OF EVERY ROWS
You do not have to manually enter the formula to calculate sum of every row.
In the first row you would input =SUM(A1:D1) (did you mean to include E1 as well?)
Then follow the instructions here to apply it the other rows

A function that will lookup a reference

Before I get started thanks for taking your time and helping.
This is what my worksheet looks like:
Row # B C D E F
2 1 Product 1 B2 B3 B4
3 2
4 6
5 1 Product 2 B5 B6
6 5
7 4 Product 3 B7
I was trying to follow this formula: (The best answer one or green check mark) return values from multiple matching rows
I got all the way to the =IFERROR(INDIRECT(lookups!H5),"") but can not get this to work.
What I am tying to do is order the numbers in Column B to go to the right of the product. Which I was able to get the column it is in (B) and the row number it is in (B2). I would like to change the value (B2) to the number that is there.
I would like it to look like this:
Row # C D E F
2 Product 1 1 2 6
3
4
5 Product 2 1 5
6
7 Product 3 4
If someone could help explain this to me or find a better way that would be great.
Not sure what is to happen to columnB but if you replace B with "="B throughout columns D:F then select each of these in turn and apply Text to Columns with Tab as the delimiter the 'cell references' convert to formulae referring to the values in B. If you want to delete columnB copy D:F and Paste Special, Values over the top.

Resources