Using Today() and Mid in excel - excel

Excel cell should have the below value
ABC,04-04-2014
the date entered shouldn't be hard coded.
I need it by using
Today() or some other function.

Either:
="ABC," & TEXT(TODAY(),"dd/mm/yyyy")
or
="ABC," & TEXT(TODAY(),"mm/dd/yyyy")
depending on your desired date format.

Related

Excel TODAY() function in IF formula doesn't work properly

I have "Microsoft MonthView Control 6.0 (SP4)" component that enters the date to cell "D17" I want my function to compare today date to cells "D17" date and give certain message. So if date in cell "D17" is older than current date it will display "OFFER EXPIRED" message. In cell "D17" I currently have 1.10.2018. I use formula =IF(D17>TODAY();"OFFER EXPIRED";"") but it doesn't work. I have tried different cell Formatting options with no success. Any ideas where the problem can hide?
Please try:
=IF(1*SUBSTITUTE(D17;".";"/")>TODAY();"OFFER EXPIRED";"")
(Seeks to coerce Text 1.10.2018 into Number before making the comparison.)
Assuming that the date you have is in string format & in dd.mm.yyyy format. Use below code for the comparison:
=IF(DATE(
RIGHT(D17,4),
MID(D17,FIND(".",D17,1)+1, (
FIND(".",D17,FIND(".",D17,1)+1)-
FIND(".",D17,1))-1),
LEFT(D17,FIND(".",D17,1))
)<TODAY(),
"OFFER EXPIRED","")

Excel date functions

I'm trying to get the current year/month/day military time in a cell. This is exactly what I need in the cell #Date:2017/AUG/14 14:55:08 I know this is super easy to do but I'm just not getting the result that I want. This is what I tried.
="#Date"=date(yyyy,MMM,D, hh:mm)
If you're after VBA:
="#Date:" & Format(now(),"yyyy/MMM/D hh:mm:ss")
If you're after a cell formula:
="#Date:" & TEXT(NOW(),"yyyy/MMM/D hh:mm:ss")
Note: Consider DD instead of D if you want day 1 to read 01 instead of 1
Just enter:
=NOW()
in a cell and custom format as "#Date:"yyyy/mmm/dd hh:mm

Excel: Format TODAY() / DATE

1) I would expect in E14 "Today is 13.09.2016", because E16 is formatted as DATE (customer)! But there is a general number instead of date. Why is Excel not able to copy the content of E16 !! How can I get the date in this position?
PS: If you suggest me ="today is "&today(), then please explain me, how I can format the date in YYYYMMDD as in the screenshot
You need to use another function to apply formatting, try the following:
="today is " & TEXT(TODAY(), "yyyymmdd")
More info:
Excel Date Formatting
Put =TODAY() in A1.
Tap Ctrl+1 and format A1 as Number, Custom, Type: To\d\a\y i\s yyyymmdd
You will display This is 20160913 but retain the underlying raw date that can be used in calculations.
Try the code
="today is "&TEXT(E16,"yyyy-mm-dd")
http://www.mrexcel.com/forum/excel-questions/513984-linked-text-today-problem.html

How to change a date type to short date

How would you change this date type Monday, 31, August2015 at 6:08 AM to short date in Excel 31/08/2015 ?
Currently I use Text to Columns on the top date, find and replace to remove the comma on 31,. Then use a combination of =text(1,"00") and =month(A1&1 to format the numbers correctly and finally =concatenation() to join them all together.
This is time consuming and concatenated dates are in a different format to short date formats. When uploading data the software will see them as such.
I'm hoping there is a really easy way of doing this to save time.
It's a long formula, but it works. Before using it make sure you set the Number Formatting for the formula cell to the short date that you want.
Assuming that your awkward date is in cell A1, enter this formula in another cell:
=DATEVALUE(VALUE(SUBSTITUTE(MID(MID(A1,FIND(" ",A1)+1,99),1,2),",","")) & " " & MID(A1,FIND("|",SUBSTITUTE(A1," ","|",2))+1,3) & " " & MID(A1,FIND("|",SUBSTITUTE(A1," ","|",3))-4,4))

Concatenation of string in excel having today() function

In a cell in excel i want to concatenate a string that contain format as below ---
Brett201505LeeMay15
I am trying to do that by today function like -
= "Brett" & Today() & "Lee" & Today()
issue is how to specify date format as "yyyymm" and "mmmyy" in a single cell.
Write now when the cell format is general i am getting some number. I guess it is datevalue. Please help.
Use this expression :
="Brett"&TEXT(TODAY(),"yyyymm")&"Lee"&TEXT(TODAY(),"mmmyy")

Resources