Number Formats For Date

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


ADVERTISEMENT

Extract Data With Differing Date Formats - Convert Text To Date

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

Make Number Formats Into Number Values?

Jul 3, 2013

I have used the formatting option to make numbers that once appeared as 1, 2, 3, 13, etc into four digit numbers, to appear as 3001, 3002, etc.

The problem is, I have other data whose original values are the 3000 formats, and Excel won't combine the two or sort them correctly.

Is there a way I can format it to change the actual value?

View 2 Replies View Related

Convert Different Date Formats Into One Date Format?

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

Custom Number Formats

Mar 20, 2009

I need to create a custom number format for a recorded delivery number in an excel sheet. I want it to look like AA 1234 1234 1GB in the cell even if the user enters it without spaces e.g. AA123412341GB. I have had a bit of a play around with underscores to get spaces but nothing seems to make it change.

View 4 Replies View Related

Changing Number Formats

Jul 16, 2009

Code be to change the number format of the range H21:H37 on my attached spreadsheet from the currency format with the $ symbol and 2 decimal places whenever cell H20 displays "UNIT PRICE" to a number utilizing the comma seperator and with no decimal places and no $ symbol whenever the cell H20 displays "SHIPPED"?

View 11 Replies View Related

US To UK Date Formats

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

How Do I Delete Custom Number Formats

May 17, 2006

I need to create some custom number formats, but after a few failed tests I
have a lot of junk that I'd like to remove. I've checked the Microsoft
knowledge base which suggest there should be a delete button, but I don't
have one.

View 14 Replies View Related

Linking To Custom Number Formats?

Nov 11, 2011

I want to display a cell with the value -1,000 as Negative 1,000. In custom number formats I have selected #;"negative" #,###;; which does indeed display the cell with -1000 as Negative 1,000, however, I want to be able to link to this cell and have the link pull in Negative $1,000.

View 9 Replies View Related

How To Limit Number Formats In Workbook

Sep 7, 2012

Is there a way to fix the the allowed numberformats in a workbook?

For example, is it possible to have only the following numberformats in a file : 0.0, 0.0% and $0.0. The file should not allow any other formats, and the user should not be able to create custom formats.

View 2 Replies View Related

Various Date Formats In Same Column

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

Different Date Formats On The Same Spreadsheet

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

Change Date Formats

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

Date Formats From Useform?

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

Change The Date Formats

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

Converting Date Formats Depend On Value

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

Reformat The Date & Time Formats

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

Chart Showing Date Formats

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

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 View Related

Macro: European & US Date Formats

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

Conditional Formatting Text Equaling To Number Formats?

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

Copying User-defined Number Formats Between Worksheets

Aug 2, 2006

I am attempting to copy some numbers from one spreadsheet to another including the formats. The format I am using is a user-defined one which doesn't normally appear in the list of personalised formats.

My code seems to work fine within the same spreadsheet but fails when I do it using 2 spreadsheets.

View 9 Replies View Related

SUMIF With Different Date Formats (Google Sheets)

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

Date Formats Incorrect When VBA Opens Workbook

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

Retrieving Various Date Formats And Return These Into Cell

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

Date Formats Not Picked Up In Pivot Table

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

Macro To Convert Date Formats In Two Columns And Compare

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

Excel 2011 :: Change Default Formats Of Number Selections In Tool Bar?

Jul 28, 2012

In the toolbar there's a section titled "Number" which allows you to change cell formats with selections named General, Number, Accounting, Date, Time, etc. I want to permanently change some of their default formats.

For instance, currently when I select Number the default is -4000.00. I want to PERMANENTLY change its default to (4,000.00). How do I do this?

View 3 Replies View Related

Count Unique Instances Of Date While Filtering Based Upon Date And ID Number

Aug 14, 2014

I have a list of ID# (Col A) and dates (Col B). The ID # of reference is Col (F) and today's date (Col G). I need to count how many future dates there are in the list (Col B) that are unique and in the future from today's date.

I'm still fairly new to all these formulas and functions which is why I'm not attempting this in VBA.

I've attached an example work book and I would like the result in H2.

Example Workbook.xlsx‎

View 5 Replies View Related

Date Countdown: Results Of The Number Of Days Between Today And A Future Date

Apr 8, 2009

I am trying to get the results of the number of days between today and a future date. I am using ="cell containing futuredate"-today() and it gets me the correct number of days. The problem comes in when I have yet to populate the future dates. I am getting -39991 (numeric value between today and jan 01 01) and because I am also using conditional formatting this is even more of a problem. Is there a way get excel to display nothing if it is a negative number? or to give a specified resut if the number becomes negative such as Expired or something of that nature?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved