Excel - Find last same value in Column X and add Column Y to current cell - excel

I have a sheet that includes (3) different sources of information, where the source is determined in ColumnA, MoneyOut = ColumnB, MoneyIn = ColumnC, and SourceTotal = ColumnD.
When working with a current row, how can I find the last row in which ColumnA = CurrentRowColumnA[Value], and sum(PrevColumnB[Value]+PrevColumnC[Value]) to CurrentRowColumnD[Value].
Ex:
A1 = Source1
B1 = 200
C1 = 200
D1 = 400
A2 = Source2
B2 = 300
C2 = 200
D2 = 500
A3 = Source1
B3 = 200
C3 = 600
D3 = 1200 (D1 + sum(B3+C3))
How can I write a function to do this continuous addition without having to do a different sumifs for each row?
I've tried:
Assuming I'm on D4...
=SUM(IF(A:A=$A4, B4+C4))+IF($A3=$A4, D3)
Which will work for the first few, but once there is another source, this formula doesn't work.
Should I be using an OFFSET() function?

Formula:
=SUMIF($A$1:$A1,$A1,$B$1:$B1)+SUMIF($A$1:$A1,$A1,$C$1:$C1)
Use this in your example sheet to get the result you want.

Related

Multiply a number by previous cell and different column

I wish to know if it is possible to multiply column(A) by column(B) and then keep on multiplying the last column(A) result by column(B), in a fast way instead of doing it manually that is.
For example:
A1 = 200
B2 = 0.8
C1 = A1 * B2 = 160 OR C1 = 200 * 0.8
C2 = C1 * B2 = 128
C3 = C2 * B2 = 102.4
C4 = C3 * B2 = 81.92
Etc...
You can use:
=SCAN(200,SEQUENCE(4),LAMBDA(a,b,a*0.8))
Note that you can use references for both 200 and 0.8.
You can use exponents to make the dynamic formula you describe based on the row. So if you put this in cell A2 and it would do what you describe, and then just drag down:
=$A$1*($B$2)^row()
Example on google Sheets (same formula works on Excel).

Simple two cells check and calculate

I have problems with this formula and cant get it right.
I cant use the "IFS" in my excel.
Want I would like to calculate for Cell C1:
If A1 is empty and B1 is empty = 0
If A1 is not empty and B1 is empty = A1
If A1 is empty and B1 is not empty = B1
If A1 is not empty and B1 is not empty = (A1*0,6) + (B1*0,4)
Example for last
A1 = 20 and B1 = 2
= (A1*0,6) + (B1*0,4)
= 20 *0,6 + 2*0,4
= 12 + 0,8
= 12,8
Thank you

Excel Formula || How to count occurrences of a value in column

Need some help in figuring out an formula to count the number of times a value is listed in a column. I will try and explain the requirement below.
The below image show sample of data set.
The requirement is to list out issues and actions per customer.
As you can see, even from values clustered in cell, we need to find out individual unique values and then map it against the adjacent column or columns.
It just need an extra sheet/table to execute..
try :
A1 = a,b,c
A2 = b,c
A3 = c,b,a
A4 = c,a
A5 = b
B1 = ss
B2 = ss
B3 = dd
B4 = dd
B5 = ss
D1 = a
E1 = b
F1 = c
C7 = ss
C8 = dd
D2 =IF(FIND(D$1,$A2,1)>0,1,"") drag until F6
D7 =COUNTIFS($B$2:$B$6,$C7,D$2:D$6,1) drag until F8
D7:F8 will be your desired results. Happy trying.

Add A1 to C1 if B1 = Specific Number

I will try to be as clear and concise as possible. I am working on a spreadsheet in which I have item prices listed in a range of A1:A40. B1:B40 lists a numerical digit (either 1, 2, 3, etc.) that corresponds with a purchase category type (groceries, gas, etc.). Now I want one cell, such as C1, to add all instances in the A range that equal a specific number in B.
For example:
A1 = $5.00 | B1 = 1 | C1 = The sum in range A1:A3 if it's corresponding B value is equal to 1 (In this case B1 and B3, so C1=A1+A3)
A2 = $2.50 | B2 = 2 | C2 = The sum in range A1:A3 if it's corresponding B value is equal to 2 (In this case B2, so C2= B2)
A3 = $4.00 | B3 = 1 | C3 =
Use SUMIF Function
SUMIF(range, criteria, [sum_range])
In Cell C1 enter the formula = SUMIF(B:B,1,A:A)

find last same value in column x and add or deduct column y

similar to a post back in May, I also need to create a sheet that includes (3) different sources of information to create a running total based on the last same value
this example is what I need to happen
Column A = D (to add) or W (to deduct)
Column B = Source1 or Source2 or Source3
Column C = the value that needs to be added or deducted
Column D = the running total based on the source (Column B)
A1 = D
B1 = Source1
C1 = 100
D1 = 100 (0 + C1)
A2 = W
B2 = Source1
C2 = 25
D2 = 75 (D1 - C2)
A3 = D
B3 = Source2
C3 = 50
D3 = 50 (0 + C3)
A4 = D
B4 = Source1
C4 = 100
D4 = 175 (D2 + C4)
A5 = W
B5 = Source2
C5 = 10
D5 = 40 (D3 - C5)
A6 = D
B6 = Source3
C6 = 20
D6 = 20 (0 + C6)
Any help would be greatly appreciated
Have tried inserting a picture, however as I am a new to the site I am unable to...sorry about that
I am using this which adds correctly
=SUMIFS($C$1:$C1, $A$1:$A1, A1, $B$1:$B1, B1)
however, I also need to make it deduct if Column A = W
Put this in cell D1 and copy it down: =SUMIFS($C$1:$C1,$B$1:$B1,B1,$A$1:$A1,"D")-SUMIFS($C$1:$C1,$B$1:$B1,B1,$A$1:$A1,"W").
I was able to get started using the formula that you provided. I modified it so that it subtracted a running total of W's for each source from a running total of D's for each source.

Resources