In one of the excel cell is the date (say 01.11.2013). I have formated this cell as DDDD so it is displayed as day (for this date it is Friday).
Now I am not able to compare the contents of the cell (actually being displayed as Friday) with string "Friday".
Is it possible? I have used Value(Text) formula and Exact(text, text) formula but it does not helps.
Thanks in advance.
Use TEXT function to compare. For example:
=IF(TEXT(A1,"DDDD")="Friday","Equal","Not")
to compare cell A1 with "Friday"
TEXT function varies by region - you need to use the equivalent of "dddd" for your region....or use WEEKDAY function which doesn't vary
=IF(WEEKDAY(A1)=6,"yes","no")
WEEKDAY returns 1 for Sunday through to 7 for Saturday
Related
I need to try to convert a basic string i.e. 1st, 2nd, 3rd into a date formatted as dd/mm/yyyy where the mm/yyyy part are this current month and year and the day equals the "number" in the cell.
For example
Cell K5 contains the string "1st"
Formula in cell A5 takes K5 and converts to 01/11/2019
Is there a way to do this?
Thanks for the help in advance
Use this to strip the last two characters:
=DATE(YEAR(TODAY()),MONTH(TODAY()),LEFT(A1,LEN(A1)-2))
Then format as desired. Mine is mm/dd/yyyy
Do you mean like this:
If so, you have to remove letters from selection then excel will convert them into date. For clarity, remove letters, then convert cells to date format.
I have a date cell 25/10/2002 in date format with the text format (if i change the format to text) as 37554. How do i pull the months and year values from this.
If i do =RIGHT(cell,4) for the year it pulls out 7554
You can simply use:
=MONTH(cell)
And
=YEAR(cell)
As it should evaluate text just fine.
You can use =TEXT(Cell value,"mm-yyyy") ##will provide you Month and year in MM-YYYY format
I am making an on-call schedule in excel and I can't for the life of me find an easy way to populate the dates. For example, someone is on call from Monday to Sunday, January 2nd - January 8th. Then the next person is on call from January 9th - January 15th. I am trying to figure out a way or formula to just "Drag" down the column and it input the next 7 day range. I have tried input the start date and end date in a separate cell, then using concatenate but it returns the date number in excel (forgot what its called). I also tried =(A1&" - "&B1) but that returns the same 5 digit number.
Any help or pointers are greatly appreciated!
Previous date + 7
If you have genuine dates, say in cells A1 "start date" and B1 "end date":
Jan 2 Jan 8
Then the next line will be
=A1+7 =B1+7
Verify Dates
To see, if the "Dates" you entered are realy dates excel can work with like that, apply "General formatting" to the A1 and B1 cells. If the resulting value is an Interer or a Decimal number, you are golden. If the resulting value did not change, you have a text and you need to apply different approach.
Perhaps you are looking for this:
=TEXT(A1,"d-mmm")&" - "&TEXT(B1,"d-mmm")
The formatting specification can be copied from the formatted cell properties.
I need to convert an Excel calendar week date into the actual date.
Excel calendar week format = ww.yyyy (e.g. 31.2014);
Expected output = 7/28/2014 (return the Monday of the week)
What formula should I use ?
It's a bit of a pain: there's no direct function. If A1 contains the year, and A2 contains the week number then,
=MAX(DATE(A1,1,1),DATE(A1,1,1)-WEEKDAY(DATE(A1,1,1),2)+(A2-1)*7+1)
will return the date corresponding to the Monday of that week in that year.
To test it, use =WEEKNUM() and =YEAR() on the computed result, along with =TEXT(,"DDD") to prove it's a Monday.
If #Bathsheba's response works for you, you can do everything in cell B1 with the following command
=MAX(DATE(LEFT(B1,FIND(".",B1)),1,1),DATE(LEFT(B1,FIND(".",B1)),1,1)-WEEKDAY(DATE(LEFT(B1,FIND(".",B1)),1,1),2)+(MID(B1,FIND(".",B1)+1,2)-1)*7+1)
This allows you to put YYYY.WW in B1 and it splits it up for you in the calculation.
i have this string which is in a date and time format (10/25/2013 8:54:00 PM),i want to extract the time from each cell and sum them to find the total time.
please can someone suggest me how to do it???
Try this formula to extract the time:
=TIME(HOUR(A1),MINUTE(A1),SECOND(A1))
Then, summarize the values and use "d h:mm" number format for the cell.
Assuming your date format is MM\DD\YYYY h:mm:ss AM/PM. Use this formula to extract time value:
=TIMEVALUE(RIGHT(A1,LEN(A1)-11))
This value is in days. I.e. if there is 6 hours, the value will be 0.25. To get number of hours multiply it by 24.
If your string is a properly-recognised Excel Date/Time format, simply:
=MOD(A1,1)
Format as hh:mm if you wish.
Regards
If you values are in ColumnA (start) and B (corresponding finish) then something like:
=B1-A1
formatted as Time should suit with summing of the results.