How to find values in one column in another column with multiple values - excel

I have an excel like
A B START DATE END DATE
1 10 01-jan-2016 02-jan-2016
2 11 01- jan-2051 02-feb-2061
3 1 04-mar-2016 07-mar-2016
4 1 08-mar-2016 10-mar-2016
5 5 01-mar-2016 03-dec-2016
6 5 03-nov-2016 31-dec-4712
I am new to excel. I want to highlight or extract the columns in A column which can be found in B Column along with the start date and end date .
That is result should be like :
A start_date end_date
1 04-mar-2016 07-mar-2016
1 08-mar-2016 10-mar-2016
5 01-mar-2016 03-dec-2016
5 03-nov-2016 31-dec-4712
Can anyone pls suggest something ?

In E2 enter:
=IF(COUNTIF(A:A,B2)>0,"X","")
and copy down. Then filter the table
You can hide any un-wanted columns after that.

Related

Calculate 3 month Average on the base of CustomerID

I am trying to calculate three month average sales in excel w.r.t customerid in excel. I tried by doing it by AverageIfs function but nothing helped.
A B C
Orderdate sales customerid
5/15/2019 7 1
5/15/2019 48.5 1
4/15/2019 92.94 1
3/17/2019 102.85 1
3/18/2019 49 1
3/18/2019 119.95 1
2/18/2019 58.96 1
1/20/2019 14.6 1
5/16/2019 17 6
4/15/2019 148.5 6
4/12/2019 912.94 6
3/17/2019 102.85 6
9/18/2018 22.34 6
Formula I tried: =AVERAGEIFS(B:B,C:C,C2)
output expected:
customerid average(3 months)
1 49.48
6 359.48
Let's start from today's date and the date 3 months ago (Make it dynamic):
Remember to change the cell format from General to Date. Otherwise, it will show [43563]
Next use the date as part of our filter:
Now you should get the most recent 3 months data:
Copy the filtered data into a new spreadsheet
Copy the filtered data into a new spreadsheet
Copy the filtered data into a new spreadsheet
Next Step: get the distinct customer ID:
You will get this:
Last Step:
Use the function "AVERAGEIF":
Done!

Excel using SUMIF to calculate totals of multiple columns

I'm trying to use Excle's SUMIF to calculate totals of Col1 to Col5 for dates that are similar.
My formula is as follows =SUMIF($A2:$A7,A10,$B2:$F7), but this only gives me the total of a single column.
How can I get the Totals of all the columns based on the date like I've shown in my results.
Date Col 1 Col 2 Col 3 Col 4 Col 5
1/5/2017 1 2 2
1/5/2017 5 3 1
1/5/2017 9 5 5
2/5/2017 10 5 3
2/5/2017 20 10 3
2/5/2017 6 8 1 5
Desired Results
1/5/2017 15 7 7 3 1
2/5/2017 30 11 11 11 8
use below formula in cell B11
=SUMIF($A$2:$A$7,$A11,B$2:B$7)
Per the example you provided, One solution is to use SUMPRODUCT
Multiplies corresponding components in the given arrays, and returns the sum of those products
Microsoft Docs give a thorough example, but per SO etiquette, here is an example in case of link-rot: [FYI, I used absolute reference for easier filling across, arbitrary how you get it done though]
Forumlas shown:
Formula is kind of hard to see without clicking on image:
=SUMPRODUCT(($B$3:$B$8=$B$11)*C3:C8)
This basically breaks down like this, it searches the B:B column for a match, and it will naturally return a true or false for the match, or 0/1 counterparts, and multiplys that by the number found in the column to the right (C3:C8), so it will either be 1 * # = # or 0 * # = 0

FCR calculations in excel

I am trying to work the (First Contact Resolution) FCR in excel however so success.
Does anyone know an automated formula used in excel?
We have been trying to use formulas to check how many times a customer with the same customer ID calls us in 7 days.
Assuming your requirement
ID Date Calls Count in last 7 days from today
1 13-Mar-17 2
2 14-Mar-17 0
5 15-Mar-17 1
1 16-Mar-17 2
3 17-Mar-17 1
5 18-Mar-17 1
7 19-Mar-17 1
9 20-Mar-17 1
1 21-Mar-17 2
13 22-Mar-17 1
2 23-Mar-17 0
17 24-Mar-17 0
5 25-Mar-17 1
21 26-Mar-17 0
Putting ID in Column A and Dates in Column B and records starts from row 2
put this formula in Cell "C2":
=COUNTIFS(A:A,A2,B:B,">="&TODAY()-6,B:B,"<="&TODAY())
and drag it all way down to see the number of calls
or put this formula if you want to calculate last 7 days from the date in sheet:
=COUNTIFS(A:A,A2,B:B,">="&B2-6,B:B,"<="&B2)
Please let me know if you meant something else as I tried my best to assume the senario.

How to get the latest date with same ID in Excel

I want to Get the Record with the most recent date as same ID's have different dates. Need to pick the BOLD values. Below is the sample data, As original data consist of 10000 records.
ID Date
5 25/02/2014
5 7/02/2014
5 6/12/2013
5 25/11/2013
5 4/11/2013
3 5/05/2013
3 19/02/2013
3 12/11/2012
1 7/03/2013
2 24/09/2012
2 7/09/2012
4 6/12/2013
4 19/04/2013
4 31/03/2013
4 26/08/2012
What I would do is in column B use this formula and fill down
=LEFT(A1,1)
in column C
=DATEVALUE(MID(A1,2,99))
then filter column B to a specific value of interest and sort by column C to order these values by date.
Edit: Even easier do a two level sort by B then by C newest to oldest. The first B in the list is newest.
Do you need a programmatic / formula only solution or can you use a workflow? If a workflow will work, then how about this:
Construct a pivot table of your data
Make the Rows Labels the ID
Make the Values Max of Date
The resulting table is your answer.
Row Labels Max of Date
1 07/03/13
2 24/09/12
3 05/05/13
4 06/12/13
5 25/02/14

Add values for each cell values those are followed up and add 0 for missing date values in excel

I have two columns
Quantity Date
2 02/01/2014
3 04/01/2014
4 07/01/2014
5 07/01/2014
1 08/01/2014
3 08/01/2014
I want to add the quantity values for each date and put 0 for dates those are missing. So end result would look like below
Quantity Date
0 01/01/2014
2 02/01/2014
0 03/01/2014
3 04/01/2014
0 05/01/2014
0 06/01/2014
9 07/01/2014
4 08/01/2014
0 09/01/2014
. ...
. ...
. ...
Can't think of a way, can someone help please
I don't have Excel in front of me, but I'll take a stab at it.
Leave your first dataset in Sheet1, but reverse the columns.
Then type
Date
01/01/2014
02/01/2014
03/01/2014
....
...into Column A of Sheet2 and drag the cells down to expand the series as far as it needs to go.
Then do a =vlookup(A1, Sheet1!A$1$:B$99999$, 2, FALSE) in column B of sheet two.
You'll get errors, where you don't have dates in Sheet1, so you can fill those in by modifying the above equation to: =IFERROR(vlookup(A1, Sheet1!A$1$:B$99999$, 2, FALSE), 0)
(I think).

Resources