I have created a table in excel and from the 5th column the header must be dates like 1 Jan 23. The problem is when I create the table and add a column to it it doesn’t increase dates by a day, it increases by a year.I tried to use fill series and changing the format but it didn’t work.
Can you please help me resolve the issue?
I changed the format to dates but it didn’t work, I also tried formula it shows the date as 00-jan-00
When you mouse over the bottom right corner (red arrow) there is an icon with arrow that allows a drop down to appear. Click on the icon and select the type of fill that you want.
Another option is to use a function that does a date offset an example is the end of month function.
=EOMONTH(H1,3) which this will be a 3 month offset. Also there is a format painter that allows you to copy the format from one location to the next clicked location. If you want to format multiple cells double click the icon then when done formatting hit the [Esc] key.
Related
I am using PowerQuery to create a certain date time duration column. I have the following xlsx table:
DateTime1: =A2+B2
DateTIme2=D2+E2
DateDiff=F2-C2
Now I want to transform Column G "DateDiff" with PowerQuery. I select the Range A to G and click on Data => From Table/Rage
I am asked where the data is and I use the prefilled entries and just click on ok. PowerQuery opens:
I select the column DateDiff and right-click and duplicate this column. A copy of this column appears and I select it. On datatype (where currently decimal is shown) I select "Duration". The values are transformed and I can see the following:
This is as expected. So first are the days, like for example 32 or 1 or 33 days, followed by the hours, minutes and seconds (and some rounding/calculation differnces in the seconds, but this can be ignored).
I click on close and load.
The table is added as follows:
The values were changed. Now column H does not show the 32,33 and 1 day anymore. The values are incorrectly shown as 1.07..., 2.08...
I do not understand why this happens? How can I get correct results here?
When I change the format to standard I get the correct numbers again. So the numbers were not changed. When I try to apply a custom format, like: T.hh:mm:ss the same wrong numbers shown. Leads to the identical problem.
It appears to be a formatting issue.
Most likely, you have col H formatted as d.hh:mm:ss
Unfortunately, Excel date d (day) format (or whatever the code for day is in your locale) will not display any value > 31. At that point it will wrap back to 1
One way to get the display you want is to turn it into a string:
=INT(A1) & "." & TEXT(MOD(A1,1),"hh:mm:ss")
You could also turn it into a string using Power Query
Add a custom column using this formula:
Text.From([DateDiff])
Then Split that column using the dot as the delimiter and select the right-most delimiter only.
Delete the unwanted columns.
I want to create a gantt chart summary that shows a person´s whole "busy" and "free" schedule by day and in a single row, from a detailed gantt chart with a list of activities of different people in multiple rows.
Basically go from this:
To this: (which I created Manually)
To be able to give a summary of people´s shifts free time between activities.
Right now I´m just using this formula to compare the start and end date in each row and produce a "1" if the condition is True, then I just condition formatted the whole Gantt cells.
=IF(AND(Q$8>=$N12,DAY($K12)<>DAY($J12)),1,IF(AND(Q$8>=$N12-0.00001,Q$8<$O12-0.00001),1,""))
I have no idea how to start. I was thinking of doing the nest things:
Create a table of the names of all the possible people to be added in the gantt chart.
Program the macro to create a new sheet with the same template.
Program a loop which starts iterating with each person´s name:
For each person´s name which exists in the gantt chart to be summarized, start creating new rows per each day they have activities scheduled (I can´t figure out yet how I´d iterate through this).
Within the each person´s loop, start iterating each row on the original sheet, evaluating each start and end date´s and pasting on the new sheet´s current person´s current day row a "1" if the condition was true in the corresponding hours.
Loop until all individual activities of each person are finished.
Continue with next person.
I´d like to know if this is the logical way to go and if you have any pointers or similar code to recycle, I am not proficient in VBA and Excel macros.
Not sure if I understand properly, but it looks like you got a set of multiple records where you store the times In and Out of each worker, several rows for each worker.
And based on that, you would like to resume data, one row per worker, highlighting start and end time of each worker, but all in a single row.
I made a fake dataset like this:
I added 2 extra columns (you can even hide them if you don't want to see them)
Field START TIME got this formula:=B2-INT(B2)
Field END TIME got this formula: =C2-INT(C2)
In Excel, Dates are integers values and times are decimal values. I used both formulas to get only the decimal part of each start and end.
All this data is a table object named T_WORKERTIMES. I made a table object so if you add new records, the Gant Chart will autoupdate.
Then I made a simple (kind of horrible) Gant Chart:
The formula I've used in H2 and drag is:
=COUNTIFS(T_WORKERTIMES[Worker];$G2;T_WORKERTIMES[start time];"<="&H$1;T_WORKERTIMES[end time];">="&H$1)
Actually, all my data is in same sheet:
I added 2 Conditional Formating Rules to highlight cells in green/white if the result of the formula is 1/0.
Also, working with times sometimes can be hard, because decimals. 0,677083333335759 means 16:15. But 0,6770833333333333 too, so in Gant Chart I rounded up headers to 6 decimals.
My formula in H1 is =ROUND(7/24;6)
My formula in J1 and drag to right is =ROUND(H1+1/24/4;6)
So now everything works fine. Please, notice in worker 1, there is no activites from 07:00 to 08:00. So I add a new row with that data and everything updates:
I've uploaded a sample yo Google Drive you can see the formulas and hope you can adapt this to your needs.
https://drive.google.com/file/d/1KOuCAYsmlY9gfNUCUhIrihXu-tJz-K7t/view?usp=sharing
Biggest issue here is the decimal part of times, to make sure they fit the Gant Chart. An easy solution would be substracting just 1 minute to start time column (calculated, you can hide it) and sum 1 minute to end time column (calculated, you can hide it).
Hope this can guide you in your project.
It looks like you are trying to extract unique records per person and day to get a person/day summary of time availability but also want it to be automated as you add more people and days.
I was able to do this with a combination of powerquery and a pivot table. When new persons/dates are added or changed the report will update but you will need to refresh using CTRL+ALT+F5
you want to highlight your entire report or an area as big as you think it will get. While highlighted you will then utilize named range feature under FORMULAS tab -> DEFINED NAMES ribbon -> DEFINED NAME dropdown. We could name it REPORTAREA or something like that.
Make sure you change the conditional format formula in report to show 0 instead of "" so this can work properly
2 go to DATA tab -> GET AND TRANSFORM ribbon -> From other sources -> Blank Query.
This will open the power query editor as a blank query
3 In the formula bar type =Excel.CurrentWorkbook() case sensitive is important
4 From there you will see CONTENT and NAME column.
In the NAME Column select the drop down and go to TEXT FILTERS -> Equals... Type in the name of your named range so the query does not pick up anything else on accident.
5 Remove the NAME column by right click selecting it and then remove.
6 you will notice the CONTENT column has two curved arrows pointing left and right instead of straight down like you are used to in excel. Click these arrows and make sure you uncheck the "use original column name as prefix" option box and ensure that the EXPAND option is selected. Then click okay.
7 At this point it looks alot like your report. Go to the HOME tab -> TRANSFORM ribbon -> Use first row as headers.
8.Select only the columns that are NOT THE 24 hr STYLE TIME LABELS of your report and then right click -> Unpivot other columns
9 At this point you can start removing some of the columns you dont want by right click and remove. Also double click and rename the columns as you wish. You can right click the top of the column and change types to what you want.
Dont worry about the 24HR style time zones not looking correct as this will be fixed later, this column should be changed to decimal type and not time zone type.
select a column that has the date information you need and right click -> Duplicate column -> change type to date.
11.At the top left part of the screen there is a CLOSE AND LOAD drop down where you will load to a new worksheet.
That will produce a green table. Select the table and press ALT+D+P to produce a pivot table linked to the green table you produced from the query.
You may need to close the Queries and Connections box that opened in order to see the pivot table options that will appear on you right.
Drag the 24hr style column to the columns area.
Drag the People to the Rows area and after Drag the Column you made in step 10 to the Rows area.
Drag the conditional format column to the Values area.
Your pivot table wont look exactly like what you want. while pivot table is selected go to DESIGN tab -> REPORT LAYOUT -> Tabular and also SUBTOTALS -> DO NOT SHOW SUBTOTALS while in the same tab.
13 Highlight all of the 24hr style time labels and format them and after highlight the inside of the pivot table where all the 1 and 0 will be and apply the conditional formatting you applied previously. Dont forget you changed the formula originally so your if statement does not end with "" but instead with 0.
If you would like i think it is easier to switch around the ROWS and COLUMNS area of the pivot table fields so that the report is easier to read. I have chosen to do so in the pictures. If you want to keep the report the way you are used to you can follow previous instructions.
I put the above comment down here as a complete answer.
I call those cells after "Finish date" column as "Chart cells". To extract a unique list of names, please refers to: here
If each name, you can use the followings formula and format for cells value >0 to show the bars.
=SUMIF([name range], "[each name]", [for each column of the chart cells])
If you further needs to filter by dates, you need to use sumifs() instead:
=SUMIFS([each column of chart cells], [name range], [unique name obtained from above], [Finish date range],"<=" & DATEVALUE("[target date]")+1,[start date range],"<=" & DATEVALUE("[target date]"))
This is the Excel formula solution, which is good if your table is not huge.
I've made an excel timetable with days and times as columns and rows, respectively. Ive created a conditional format to highlight the current day, time and corresponding cell.
When the current time ticks over into a new 1/2 hour interval the conditional format doesn't automatically change and instead just goes blank as though it's stopped working (and yes I've got 'Calculation Options' in the 'Formulas' tab set to 'Automatic').
When I double click the reference cell (e.g. the time row corresponding to the current time) and click off it, it works. This is obviously not ideal - any suggestions would be great.
I have seen this issue raised but haven't had any satisfactory solutions.
I'm using an application called Kroll OnTrack to manage a review of documents as part of a litigation project. Kroll can export the metadata for these files into an XLS file. The problem is that when Kroll exports the dates for these documents, it seems to do so as a string, and the dates are being exported in MM/DD/YYYY format, so when I go to sort by date, the documents line up in this order:
01/01/2005
02/02/2005
03/05/2010
04/07/2006
05/03/2007
...and so on.
I need to be able to sort the table by date so we can put together a chronology of these documents. Trying to force Excel to re-format as a date doesn't seem to work, nor have I had any luck using DATEVALUE(). Right now, I'm doing text-to-columns then re-concatenating the dates, which seems to work, but is there a more elegant/efficient solution for this issue?
Perform Text-to-Columns on that column of dates but with some optional commands.
On the first screen of the T2C wizard, choose Fixed Width and click Next.
On the second page of the wizard, discard any border that Excel added by dragging them up out of the Data Preview window. It is very likely that none will be there. Click Next.
On the third page of the wizard, choose Column data format, Date and MDY from the drop-down selector beside Date.
Click Finish.
You should be left with real dates in the column. This procedure is easily recorded for future use.
In a column adjacent to your text dates, you could try something like this
DATE(RIGHT(E3,4),LEFT(E3,2),MID(E3,4,2))
Then copy down and sort/filter on this column of real dates.
Where cell E3 contains you text-date. You could also follow up with Text(...,"yyyy-mm-dd") or some other date format, if you need the date in a specific format.
The formula assumes that the text string contained in cell E3 is of length 10 (i.e. all white space is trimmed and padded zeros for day and month are used). If this is not the case, the forumula is easily amended.
I am currently pulling out US date from another spreadsheet using the following formula
=LEFT(IFERROR(VLOOKUP(A:A,'Token Report 2'!A:C,2,FALSE),""),16)
which gets me the following:
04/23/2014 23:04
from
04/23/2014 23:04 CDT
How do I get it to convert it to a UK date/time and get it to register with Excel?
Add 5 hours to go from CDT to GMT.
=VALUE(LEFT(A1,16))+5/24, where `A1' hold the text, will give you the correct date and time value. You'll need to format the cell to display properly as a date and time, or convert it to text explicitly (not usually recommended).
So =VALUE(LEFT(IFERROR(VLOOKUP(A:A,'Token Report 2'!A:C,2,FALSE),""),16))+5/24.
You can use Excel's text-to-column function. I'm copying the answer from here
Paste the dates into a column in a new Excel spreadsheet
Select the whole column
Select the Data menu > Text to Columns
Choose “Delimited” and click next
Untick all Delimiters and click next
Select the dropdown menu format “Date: MDY” and click Finish