Help with EXCEL

Aimster

Lifer
Jan 5, 2003
16,129
2
0
So who can do this?

Convert 0001 to 01-2000 or January 2000

Anyone know the formula? This is a tricky one.
 

sandorski

No Lifer
Oct 10, 1999
70,231
5,807
126
Originally posted by: Blackjack200
Vote for Obama and help convert 1-21-09 into a happy day!

ahem...

Yes, Obama for Change. Or McCain for Change that isn't.
 

Duwelon

Golden Member
Nov 3, 2004
1,058
0
0
You could do this with VBA like this:

Function convert1()

inputData = "0001"
Month1 = Right(inputData, 2)
Year1 = Left(inputData, 2)

DateFinal = DateSerial(Year1, Month1, 1)
DateFormatted = Format(DateFinal, "MM-YYYY")
MsgBox DateFormatted

End Function

Not sure about cell formulas, but this could be altered to convert any number of rows that you wanted. Do you have a certain range of rows or columns you need converted?

PS, i'd rather sit through a round of russian roulette than see Obama elected.
 

KingGheedora

Diamond Member
Jun 24, 2006
3,248
1
81
The question you must ask yourself is this: Are you sure you want to participate in anything that requires this particular help with "EXCEL"?
 

Jeff7

Lifer
Jan 4, 2001
41,596
19
81
How is the data entered? Is it already in the sheet, or is it yet to be entered?

What I did:

1) Format a column (Format Cells)
2) Under the Number tab, under Category, select "Custom."
3) Enter YYMM in the Type field.
4) Type in all your data in the 0001 format into the column, or else do a Paste-Special -> Values
5) Go back to that Custom format thing for the entire column or set of data.
6) Change format to MM-YYYY, and click OK.
0001 should now say "01-1900."


Alternate to step 5) :
5) Go to the Format Cells window again, but under Category, choose "Date."
6) Select a type from the list. I show one there that says March 14, 1998. If I choose that, the cell now says "January 1, 1900."

 

Aimster

Lifer
Jan 5, 2003
16,129
2
0
Here is the tricky part:

I want 0001 to read as the year 2000 month January.

It won't convert it properly

0204 for example would be April, 2004.
 

puffff

Platinum Member
Jun 25, 2004
2,374
0
0
Originally posted by: Aimster
Here is the tricky part:

I want 0001 to read as the year 2000 month January.

It won't convert it properly

0204 for example would be April, 2004.

=date(left(A1,2) + 2000, right(A1,2), 1)

I think that would work.
 

Aimster

Lifer
Jan 5, 2003
16,129
2
0
nope

Still not working.

With that formula it says 0001 is year 2001. Not 2000.

Is this a flaw in Excel?
 

petesamprs

Senior member
Aug 2, 2003
278
0
76
The formula you need is: =DATE(MID(A1,1,2)+2000,MID(A1,3,2),1)

Then, depending how you want the output to show up, right click on the cell, go to "Number", "Custom" and under "Type":
- type "mm-yyyy" to display as "04-2002"
- type "mmmm yyyy" to display as "April 2002"
 

Aimster

Lifer
Jan 5, 2003
16,129
2
0
Doesn't work!

I want 0204 to Display as April, 2002!

or 0212 to Display as December, 2002

It says 2020!
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |