Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Fomula Help

Status
Not open for further replies.

iwant750

Vendor
Apr 24, 2008
27
US
Hi I have a spreadsheet with two date colums. Column H is formated in MM/DD/YYYY. Column B Is formated the same. This data is exported from a DB in this format. I need Column B to be in YYYYMM Format, it shows us year and period. I need a formula that will take this info from column H and populate column B for me. I've been adjusting manually but with a few thousand rows its tedious. Thanks in Advance
 


Select the date column of interest.

Right-click > Format Cells > Number Tab > Category: Custom ...[/b] and enter
[tt]
yyyyymm
[/tt]
in the Type: textbox.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
That works thanks. But with the new format it is still reading the date format of mm/dd/yyyy which causes the sort to not work. Did I miss a step about changing the cell type from date to textbox?
 


Youosaid that BOTH columns were DATES. If they are REAL DATES, either will sort correctly.

If NEITHER are REAL DATES, then all you have is TEXT that must be converted to REAL DATES. It appears that this is the case. Select A column containing your text string dates. Data > Text to columns > NEXT > NEXT > Select the MDY structure of your text > FINISH

NOW you have REAL DATES. faq68-5827



Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
You need Skip's faq to understand this: faq68-5827
or simply sort descending maybe?

To convert to text use the Text function.

Gavin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top