Date Formats In A Cell Which Also Contains Text
Nov 29, 2013
I need to change the date format in a cell which also contains text.
The full formula is as follows:-
="Report period:
"&TEXT(Control!B9,"dd mmmm yyyy")&" - "&TEXT(Control!B10,"dd mmmm yyyy")
This gives me the following:-
Report period:
01 October 2012 - 30 September 2013
What I would like to have is the following:-
Report period:
1st October 2012 - 30th september 2013
It's only a minor change but I think it looks better. Without a hideously complicated formula, if this is possible using one of the standard cell formats?
View 4 Replies
ADVERTISEMENT
Mar 27, 2013
Extract data with differing date formats that I need to convert to something consistent that I can format as a date.
This is an example of data.... all with general format at the moment.
2/28/2013 2:48:53 PM
1/16/2013 10:48:50 AM
12/17/2012 11:59:49 AM
I have used this formula to extract the date portion, but I can't get this to then format as date. How do I convert this to the julian date, so I can then apply a date format?
=LEFT(G9,SEARCH("/",G9)+7)
(The day portion of this date always has a leading zero).
View 9 Replies
View Related
Nov 17, 2011
I am trying to find dates & time within text in a cell & return to a separate cell. The issue I have is that the date format varies frequently. I also can't rely on searching for "Sent:" as this also varies frequently
e.g. From: ########
Sent: 17 November 2011 11:57
I would like to return 17/11/2011 11:57
From: #######
Sent: 01/11/2011 11:50:13
I would like to return 01/11/2011 11:50
From: ########
Date: 05/11/2011 09:45:13
How can i search for various forms of dates and return them into a cell?
View 2 Replies
View Related
Apr 15, 2013
I have a worksheet where in a column, dates are stored in various date format i.e. it may be DMY or MDY or YMD.
08-06-12
08-06-12
08-07-12
08-07-12
13/08/2012
13/08/2012
13/08/2012
14/08/2012
Above is just for an example, above dates are for the month of August, but as can been some cells are in MDY formate and some in DMY. Can I have formula to convert different date formats into one date format?
View 9 Replies
View Related
Oct 21, 2009
I'm running excel 2000 and don't have access to mscal.ocx, so i have used the date time picker with a calendar, but the formatting of the calendar is in US format m/d/yy and I need it in UK format d/m/yy, I have narrowed it down the following piece of code, the D values are the days,
View 12 Replies
View Related
Jun 22, 2014
I need for my office a table which has one column with dates. The "issue" is, that sometimes I know the whole date (day, month, year), sometimes only the month and year and occasionally just the year. Is there a way through custom number formatting that excel behaves correctly? How would I need to set conditions to achieve this? Because now something happens which is 99% incorrect .
View 6 Replies
View Related
Mar 13, 2007
I have data sent to me with different date formats on the same spreadsheet; I used Format - Cell and format date to this format: yyyy.mm.dd. However, only some of the data changed to this format and rest remain the same. I've tried many other ways, but didn't work.
View 14 Replies
View Related
May 28, 2009
I have a userform which allows data to be entered onto a worksheet. One of the fields (a textbox with the standard calendar control) is the date. When the transaction saves, it correctly saves the date as dd/mm/yyyy using
ActiveCell.Value = TxtDate.Text
I also have a form which allows the user to amend a transaction by loading the data onto the form, amend it and save it back to the worksheet.
The problem is that when it picks up the data and re-saves it, it's resaved in the format mm/dd/yyyy which is a problem because I use the month as one of the categories that users can filter the data by.
I also have the following line immediately after each time the data is saved from the form to the worksheet:
Selection.NumberFormat = "dd/mm/yyyy;@"
View 7 Replies
View Related
Jan 26, 2010
I have a simple piece of code that gets a date from the user via inputbox in the format dd/mm/yyyy. That date is then put into a cell (e.g. B1), and the cells to its right get given something like "=B1+2", "=C1+5" etc so that they will all show a date a few days further down the track. (Much more complicated than that but this is the basic idea)
The entire row is then formatted "ddd dd mmm yyyy" with the intention of every column getting a header like "Wed 27 Jan 2010". This works perfectly for every column EXCEPT B which shows the the string "27/01/2010" it was given from the inputbox.
Right clicking --> Format Cells shows every cell in the row has the exact same 'Custom' format, and the 'Sample' at the top looks correct for every cell except B1.
BEFORE the macro runs and formats all the cells, but AFTER they have been given their formulas, they all display something along the lines of '40021', '40023' which I assume is the number of days since Jan 01 1900 or the like - proving that THEY knew the value in B1 was a date, so why doesnt B1 itself know?
View 2 Replies
View Related
Mar 1, 2012
I have a userfiorm with a text box that auto fills as follows
PHP Code:
Fill Datebox DateBox.Value = Format(Date, "dd/mm/yyyy")
which today fills the text box as 01/03/2012 (UK format), however when i try log a record as follows
PHP Code:
copy the data to the databasews.Cells(iRow, 1).Value = Me.DateBox.Value
it changes the date to the american format so that it is pulling through on the data base as today being the 3rd Jan 2012.
View 2 Replies
View Related
May 9, 2008
I am importing data (using filestream) from txt files with comma delimited values. When I import dates into General type cells it turns a date of dd/mm/yyyy into mm/dd/yyyy only if the date makes sense.
I would like it to import dd/mm/yyyy as dd/mm/yyyy.
I am also interested to know how Excel/VBA deals with dates coming from various sources, what quirks or mode of thought it follows.
View 9 Replies
View Related
Mar 10, 2009
I need to amend that column to display 26 Mar ( or 12 Dec or 17 Apr etc depending on value).
Try as I might, using format cells, nothing results in the required display. I'm not even sure what format the cells were in as received, since highlighting the received column and selecting "format cells" does not reveal the initial formatting. If I try pasting special to a new column and selecting values, I just get the numerical date value as a 5digit number.
View 6 Replies
View Related
Dec 1, 2009
I've attached a small sample of an excel file I created from a CSV. The date has defaulted to American format and the time is, as you can see, messy. How can I reformat so that I can have British date format and 24 hour clock?
View 2 Replies
View Related
Jul 20, 2012
I have a spreadsheet that has two columns. Column A is a date format and column B has the number of days between both dates over 2 years analysis is =A8-A7.
However when i come to build a chart its all wrong as the dates are following a weekely format, can i adjust this to pick up only the dates that are showing on the cells in column A? also is ther ea way which teh #VALUE! doe snot show?
02/07/2012
14/08/2012
43
00/00/0000
#VALUE!
[Code]...........
View 2 Replies
View Related
Nov 20, 2006
An in-house server spits out a whole lot of dates which I put into Excel and then use the dates for analysis (VBA code). The problem is that Excel is getting confused about the date formats. Sometimes the dates are formatted as dd/mm/yyyy and then the next line can randomly be mm/dd/yyyy. This totally messes up all changes of having data integrity.
View 5 Replies
View Related
Aug 9, 2014
I have data which is exported from my system which includes the job date and gross profit amount. I want to find the gross profit total for each day based on a matching date. However, the data exported includes the time in the date cell and Google Sheets won't match it. I'd like to avoid using a helper cell if at all possible.
You can see the formula here : [URL] ....
Formula is on the Q column.
View 1 Replies
View Related
Apr 29, 2008
I'm new to VBA so my i'm having alot of problems figuring out simple stuff.
Below is my script and when i run it, the dates turns out incorrect.
I noticed this only happens to dates that are before 13th of each month.
Example,
1st May 2008 ( 01/05/2008)
will turn up as
5th Jan 2008 ( 05/01/2008)
However when i manually open the file Todays trades.csv
The date looks just fine.
Is there some problem with using VBA to call up the file?
View 9 Replies
View Related
May 16, 2012
I have inherited a spreadsheet that I need to update soon. It takes data that has a date field and creates a pivot table by month. The person who created it completed it thru February. Now I have added data for March and April, but the pivot tables can not find this new data and I suspect it is because of the date formatting (I have done the Change Data Source under PivotTable Options to include all the new data).
The reason I suspect the date format is that she built a button to run a macro named "dateformat", which is not in the workbook. I have tired to manually format the date using the format painter from the February dates that the pibvot table recognizes, but I still get no results.
View 4 Replies
View Related
Jul 14, 2007
Is it possible to get Vlookup to pull the format of text across to the new cell?
For example, if the source data is bold, can you get it to show up as bold in the new cell? Or worse, if there are multiple formats in the original cell (like some text is bold, some is red font etc.) can that be pulled across through Vlookup?
View 5 Replies
View Related
Sep 15, 2014
I have two columns containing dates (Date1 and Date2). Date1 is like a long date and Date 2 is a short date. I need a macro to compare these two dates and delete rows where Date1 <> Date2. Please find attached the before and after file which also contains the date formats for these two dates.
View 8 Replies
View Related
Jul 19, 2014
I am using Excel 2013. Anyway, the first issue is that I need to pull a date and a time period from text. So, for example, if I see something like Sunday Prime Time 7/6/14 8:37PM, I would want to pull ONLY the "7/6/14 8:37PM" out of it. Each text box could potentially be different, so it might not always be in the same format as "Sunday Prime Time 7/6/14 8:37PM" it might only show just the date and/or the time without all the extra text i.e. 7/6/14 8:37PM. Some of the cells will have text, others might only have just the time or even just the date and the time. The only thing that I am worrying about in each cell is extracting just the date and time. If this is too much to ask of excel, I would be ok with extracting ONLY the time - 8:37PM and not the date, but I would much rather be able to get both the time and date.
THEN, onto part two of my question. After I would pull the dates and times, I need to compare them with each other. So, when I have the same date with two separate times on that date, I need to write a formula to show if those times on that date are less than 30 minutes apart. So, if I have 6 times on 7/6/14, I need to know if any of them are less than 30 minutes apart.
I would need to have the formula say something like "Problem" if the times on 7/6/14 would be 5:30PM, 5:48PM, 7:00PM, 8:00PM, 8:15PM, and 9:00Pm for example. I would like to see the word "Problem" since 5:30PM and 5:48Pm is only 18 minutes apart, and "Problem" after 8:15PM since that is only 15 minutes past the 8:00PM which is obviously under 30 minutes. The times that are more than 30 minutes apart such as 7:00PM and 9:00PM for example are more than 30 minutes apart from any of the other times that were extracted.
View 7 Replies
View Related
Feb 29, 2008
I have been using conditional formatting for a project in Excel 2007 but as the end users are using Excel 2003, I have had to switch to the following VBA solution as my requirements exceed the standard 3 available conditions. I have looked at using custom formatting but I need to format the cell colour rather than just the font colour.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim icolor As Integer
If Not Intersect(Target, Range("C19:IV384")) Is Nothing Then
Select Case Target
Case "0.5", "1", "U"
icolor = 38
Case "C", "M", "P"
icolor = 40
Case "A", "S", "D"
icolor = 36
Case "L", "UP", "C/E"
icolor = 35
Case Else
'Whatever
End Select
Target.Interior.ColorIndex = icolor
End If
End Sub
* When the macro is run on one worksheet, formatting and values are replicated simultaneously on another identical worksheet (not necessarily vice versa).
* As well as formatting cell colour when containing a value, a border should also be added with different colours for the top, bottom, left and right border.
* When the cell contains no value, the borders should return to how they were previously.
View 3 Replies
View Related
Dec 29, 2008
I'm having trouble keeping the formatting correctly in a text box through VBA. I'm sure this is something simple, but I'm the intern that got stuck with trying to program for the break since they know I've taken classes on the subject. I've been able to figure out a lot
End goal: To have the first word of a text box larger, underlined, and bolded. Problem: It only formats it Calibri at 24 point with no special formatting as indicated in the code.
View 3 Replies
View Related
Apr 20, 2013
Conditional Formating Text equaling to Number formats:
Example:
C20 is '436.59 (its pasted as text often is must remain as text) and D20 is 436.9535
I want D20 to have only 2 decimals and turn green if it equals C20. And turn red if it doesnt equal C20.
View 1 Replies
View Related
May 1, 2008
I have a user form which includes some text boxes (txtRUL.text for example) where I want to enter a number as a percentage. I divide the number entered by 100 to avoid Excel automatically multiplying by 100 and the result is displayed in the user form as the correct percentage.
Private Sub txtRUL_AfterUpdate()
EnableSave
txtRUL.Value = Format(txtRUL.Value / 100, "0.0%")
(I'm sorry I cant figure out how to format this code as code in this post)
This works well, trouble is when I save and it writes the results to the worksheet, the numbers in the user form revert back to plain unformatted non percentage numbers (ie 5% goes to 0.05)
View 9 Replies
View Related
Aug 13, 2005
This error occcurs when i add some worksheets to a workbook from another
one. I am not completely sure (cos this is not my work actually) but it
seems to me that there is not really too much (about 4000?) "different" cell
formats in the workbook, but there is a quite lot amount of drawing objects
(grouped technical drwaings plus autocad objects which i also converted them
to bitmaps to overcome the error).
I also dont understand the restriction:
If i have 3999 cells formatted "bold" and another 2 formatted "underlined"
this should not count 4001. True?
My workbook has about 15 worksheets with each fits to 2 printing pages.
View 13 Replies
View Related
Nov 30, 2011
How to copy the cell formats of the copied range in the vba.
Code:
Sub Summary_All_Worksheets_With_Formulas()
Dim Sh As Worksheet
Dim Newsh As Worksheet
Dim myCell As Range
Dim ColNum As Integer
Dim RwNum As Long
Dim Basebook As Workbook
With Application
[code]......
View 1 Replies
View Related
Jan 15, 2014
In effect the code looks at sheet 'data' and creates new tabs depending on the contents of column f and then pastes data from the entire row into those tabs as appropriate - this is what I asked for and works wonderfully. What I would like it to do is to also copy the format of the row that it is copying. (most importantly the cell borders and colours)
I can (I think) identify the copy and paste elements of the code but have no idea what if anything I can change to make this work.
The code is as follows
HTML Code:
Sub CopyData2()
application.ScreenUpdating = False
Call Sample ' this inputs data into column f
Dim rCell As Range
Dim lastRow As Long
[Code]....
View 1 Replies
View Related
Oct 14, 2008
I have a relatively complicated spreadsheet 'process' which involves a number of different people filling in Excel based progress reports, in similar formats (created from the same template), and then invoking a common "publish" VBA macro which opens a common "master" workbook and copies their sheet into the master one ( deleting any previous one of the same name). The master sheet thus contains around 30 similar sheets published from different people, plus a couple of summary sheets. Note I also then copy cells in order to get around the 255 character limit on worksheet copy
All works fine except this week it decided to raise the "Too Many Cell Formats" error when trying to open the master workbook. I didnt know about this error, but apparently there's a limit of around 4000 cell formats per workbook. Given that the individual sheets are similar, I presumed that they wouldnt all have their own cell formats. I dont know how to check the number of different cell formats (it's not the same as checking the number of styles) or how to condense them to avoid any limit.
Looking at the actual styles defined in the master workbook, it seems that styles are duplicated when sheets are copied - I have multiple "normal" and "hyperlink" styles. I dont know why, or how to avoid this.
So - any ideas on how to avoid multiple cell formats (or even styles) when doing a worksheet copy into a different workbook? It needs to be an automated solution (i.e. macro) - I'm not able to go in and perform manual operations every time someone publishes (i.e. copies in) a new worksheet
View 3 Replies
View Related
Dec 1, 2006
Is there a way for your linked data to cary over formatting such as Bolds, borders, fonts and colors?
View 3 Replies
View Related