In Excel, how can I create a table which has a start date and end date with the unique value next to it from a list of dates with values? - excel

I have multiple very large table's in Excel which are similar to this (all the tables have the same repeating value in a particular date range):
I would like to create other tables from this which have a start date and end date with the unique value next to it.
Using the example above - I would want to get the following:
I'm struggling to find a way to do this. Am I missing a trick somewhere?
I was wondering whether anyone can help me out with this/ has useful advice?
Thank you.

Use a Pivot table.
Put the date in values twice and change one to the Min and the other to the max then format the output as dates:

Related

How to get rid of time from a date column Excel?

So, I have an Excel file where I grab data from a Jira instance where I have some columns with dates. I'm trying to create a graph where it counts the dates based on =TODAY() formula. However, since the dates are imported along with the time stamps the =COUNTIF formula does not recognize the date unless I manually delete the time stamps, which can be a nightmare thinking that there are more than 100 cells populated with dates along with time stamps. Basically I want to know if it's a way to get rid of this time stamp and leave only the date behind. Here is a screenshot so you can understand what I want to delete. Picture with the timestamp showing in the cell
Thanks in advance for everyone trying to help!

Excel formula to look up a value using Row and Column values in a table

This is a two part question. I want to lookup a price of an item based upon the effective date of the price. I've seen the vertical effective date examples but mine is somewhat different. I have the Items in the first column (A). The remaining columns contain a header with the effective date of the price. Hopefully I'm able to attach the format example. The reason I have the table formatted this way is that I don't want to duplicate the items when a new price is entered. So, I want to provide the formula an ITEM and then select the current price base upon the effective date. Right now the table has 2 effective date columns. So,The second question is how can I format the table so when I add a NEW price with a new effective date (an additional column) without having to change the look-up formula? Can the formula be formatted to be dynamic?
Thanks in advance for your input.
As per my comment:
The formula in B11:
=INDEX(1:8,MATCH(A11,A:A,0),MATCH(TRUE,INDEX(ISBLANK(1:1),),0)-1)
As you notice I have populated A1 to get this working correctly.
You can use:
=INDEX(1:1040000,MATCH("ITEM1",A:A,0),MATCH(1E+99,1:1))
If the date is always equal to or less than today I would use:
=INDEX(1:1040000,MATCH("ITEM1",A:A,0),MATCH(TODAY(),1:1))
Where the item can be replaced with a cell reference that contains the item to be looked up.
Please refers to JvdV's table, another shorter formula option
In B11, enter formula :
=LOOKUP(9.9E+307,INDEX(1:8,MATCH(A11,A:A,0),0))
Thank you everyone for your input. It was invaluable for working a solution to my problem.

How to merge two array of time in (hh:mm:ss) in ascending order into one combined array in Excel? Without using VBA

I am new to stackoverflow, do forgive me if I had made any error in presenting my question.
My current data in excel is as displayed in the screenshot.
How to combine two array in time format hh:mm:ss into one single array in ascending order
Basically I would like merge column (C) and column (D) into one single column (E) in an ascending order. The Data are all in time format hh:mm:ss
I understand that some of you may suggest using the filtering options but I have some constraint in the excel spreadsheet and the filtering option in excel does not really work out for time format values.
Looking forward to the community's solutions. Thank you!
If they are true times then you can just use simple addition.
E8:
D8+C8
Then just set the format of the cell to a custom format of [h]:mm:ss, which means it will go past 24 hours when summing it.

How do I make a lookup formula also include a date range condition?

I'm trying to return a text value based on other text values matching AND a row's date falling in between another specified date range.
I'll try to create a simplified example of what I'm trying to achieve.
Let's say I have the following table breaking out produce units sold by day:
ProduceTable:
Now, let's say that I have another table detailing the discounts that I ran for items during certain date ranges:
ProducePromoTable:
[Edit: This example isn't great because the discount amounts are numerical, so ignore that and pretend that it's just text because that's what I'm really after. SUMIFS (I think) are off the table since I'm not trying to return a number value.]
What I would like to do is pull the discount amount into the first table based on whether the type of produce matches AND checking for whether there was a discounted price on that item on that particular day.
I've tried some lookup combinations and index-match, but I haven't quite cracked the code.
Anyone have any suggestions?
Assuming your other table is on a sheet named 'Discounts', then you can use this formula on cell D2 of the first table and copy down:
=IFERROR(INDEX(Discounts!$B$2:$B$6,MATCH(1,INDEX((Discounts!$A$2:$A$6=B2)*(Discounts!$C$2:$C$6<=A2)*(Discounts!$D$2:$D$6>=A2),),0)),"")
I would use the SUMPRODUCT function to find your values:
=IFERROR(INDEX($G$2:$G$5,SUMPRODUCT(($F$2:$F$5=B2)*($H$2:$H$5<=A2)*($I$2:$I$5>=A2)*ROW($G$2:$G$5))-1),"Not in Range")

VBA: finding maximum of a column with duplicates entries

I am trying to use VBA to find the maximum value of a column at a particular date. The date has multiple entries and I am trying to get the maximum value at each date:
Can someone please help me with this?
Using VBA. ReverseSort by date and then by Column C and then do a remove duplicates. Remove duplicates moves everything after the first instance. If you sort correctly first then that's exactly what you want.

Resources