I have Excel table when one cell has 'text' formating and literally is A1 ABC: and second cell is custom formatting and literally is B1 2013-11-4
I need in the third cell C1 to concatenate both and get ABC:2013-11-4
I tried this: =concatenate(A1,A2) but it resulted in ABC:41582
My question: how could I concatenate A1 and B1 in order to keep custom formating of B1 cell?
Thanks
You have to set the date format within the concatenation. The concatenation is retrieving the value behind the cell.
Instead, you can easily specify the date format using TEXT(cell, format):
=CONCATENATE(TEXT(A1,"YYYY-M-D"),A2)
The YYYY, M, and D represent four digit year (2013), month (11), and day (4) respectively.
The Answer provided by grovesNL fixed my problem.
Ticket could be closed.
Related
I have a cell that has the formula =INDIRECT(CHAR(COLUMN()+65)&ROW())*MONTH($A$1)/12 where INDIRECT references an integer and $A$1 is a date. For some reason, the MONTH part converts the entire cell into a date instead of a number. How do I change the formula to have it return a number in number format? (Manually changing each cell through the ribbon is not an option for me).
I haven't tested this (and I can't comment till I get 50 rep), but you could wrap the whole thing in a text formula, then multiply by 1:
=TEXT(INDIRECT(CHAR(COLUMN()+65)&ROW())*MONTH($A$1)/12,"#")*1
Hope this helps!
I have rows containing every Monday and Sunday in an entire year, (with variations on when a month starts and ends) like so,
11/05/2015 18/05/2015 25/05/2015 01/06/2015 08/06/2015
17/05/2015 24/05/2015 31/05/2015 07/06/2015 14/06/2015
However these are in the date format, and I need them in a text format, but so they still read in the dd/mm/yyyy format, not like 42125.
Further up my document, each column header should read dd/mm/yyyy-dd/mm/yyyy using each of the dates shown in my first example, and I was hoping to achieve this using the formula =A30&"-"&A31 and so on. So the desired outcome should read,
11/05/2015-17/05/2015 18/05/2015-24/05/2015
11/05/2015 18/05/2015
17/05/2015 24/05/2015
However using the =cell&cell formula im left with
42135-42141 42142-42148
11/05/2015 18/05/2015
17/05/2015 24/05/2015
I have to create these headings for 2 years worth of dates, and trying to avoid typing every heading out manually, is there a way to achieve this?
Use the TEXT function which comes with Excel.
Assuming cell A1 has "11/05/2015", use the following formula in cell B1:
B1=TEXT(A1,"dd/mm/yyyy")
This takes care of the first part of your question. For the second part, you can use the CONCATENATE function. Assuming that B1 and B2 contain dates as text, you can join them together using the following formula:
=CONCATENATE(B1, "-", B2)
Try converting those values to text before concatenating:
=TEXT(A1,"dd/mm/yyyy")&"-"&TEXT(A2,"dd/mm/yyyy")
You need to break them down like so:
=DAY(A3)&"/"&MONTH(A3)&"/"&YEAR(A3)&"-"&DAY(A4)&"/"&MONTH(A4)&"/"&YEAR(A4)
I am assuming here your data start from cell A3
Assuming headings in row 1 and dates in rows 3 and 4 this will work:
=TEXT(A3,"dd/mm/yyyy")&TEXT(A4," - dd/mm/yyyy")
without having to concatenate " - "
Following is the which I am trying :
Let this number 6,123,456.33 in Cell A1,
Then in Cell B1 use this formula =TEXT(A1,"#,###,###.##"), will give you 6,123,456.33.
Then in Cell C1 use this formula = SUBSTITUTE(B1,",",".") ,will give you 6.123.456.33
Then in Cell D1 use this formula =","&RIGHT(H12,2), will give you ,33.
Then again come to Cell C1 Do text to columns or other options to remove the last digits with decimals and then concatenate result with Cell D1 shows the last three digits.
This tip will ends up in 6.123.456,33
But Problem is in point no. 5.
How should I remove .33 from cell C1?
TRUNC is not working on C1.
Any Suggestions ?
Seems like you don't mind having the result as text (and I can't seem to find a way to custom format it...) and as such, you can use the formula:
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(TEXT(A1,"#,###.00"),",","#"),".",","),"#",".")
There's a triple substitution, one to remove , for # (a dummy character), second to change . to ,, then last from the dummy # to ..
If A1 is always a 7 digit number with 2 decimals then you could use TEXT function like this:
=TEXT(A1*100,"0\.000\.000\,00")
I have an Excel file which is exported from a Access database.
I have 25000 records and I will need to replace all of them.
The date column is not formatted (yymmdd). I need to change the date format from yymmdd to dd/mm/19yy. For the yy I need to add a constant value 19 in front of it so it would be 19yy.
I have only 1 date column per row
Is there any way to convert all the 25000 record's column formatted in yymmdd to dd/mm/19yy in a few clicks?. Thank you
This will give you the result as an actual date which you can then format as you wish using Excel's date formatting options.
=DATE(1900+LEFT(A1,2), MID(A1,3,2), RIGHT(A1,2))
If you don't need to parse it into a date value, but merely need to display a date in the format you identified, the following will work on a value in cell A1 (copy down to the rest of the 25,000 values as needed:
=RIGHT(A1,2) & "/" & MID(A1,3,2) & "/19" & LEFT(A1,2)
In my cell A1, I entered the value 981116. This formula converted it to 16/11/1998. I think that's what you're looking for, right?
Assuming data starts at A2 put this formula in B2
=(19&TEXT(A1,"00-00-00"))+0
Now format B2 in required date format, e.g. mm/dd/yyyy
and you can easily "fill down" all 25000 rows by doing this:
put cursor on bottom right of B2 (first cell with formula) until you see a black "+" - that's the "fill-handle" - double click and the formula will populate as far down as you have continuous data in the adjacent column
Note: you can probably omit the 19& if all your dates are after 1930 because the default is to treat any date written without the century as 1900s if it's >=30 or 2000s if it's <30 [although you can change that in regional settings]
I have 2 cells, one cell has just text A1 cell, text (hello) other cell B1 has a timestamp (3:55). I need to combine these cell to one with this format: hello#t=3m55s, or if timastamp is 1:12:11 format will be hello#t=1h12m11s. So cell A1 will change to this specific format base on B1 cell.
Thank you.
You could try this formula:
=A1&"#t="&IF(HOUR(B1)=0,"",HOUR(B1)&"h")&MINUTE(B1)&"m"&SECOND(B1)&"s"
The & concatenates each part together. However, if the timestamps are not correct for the mm:ss times, then it won't work.
EDIT: To deal with the issue of timestamps:
=A1&"#t="&IF(SECOND(B1)<>0,HOUR(B1)&"h"&MINUTE(B1)&"m"&SECOND(B1)&"s", HOUR(B1)&"m"&MINUTE(B1)&"s")
The issue with this is that it won't work for timestamps of the type "11:11:00" But I don't think there's much to be done, unless the string is first converted to text, which I could give some pointers on.