Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
carl
 
Posts: n/a
Default Matching 2 "dates" that are formated differently

I have data from 2 sources. I would like to match up the data that is tagged
with the same month and year data. For example:

data set 1

Date Product
200503 ABC

data set 2

ColA ColB ColC
Date Product
3/18/2005 ABC TRUE
5/15/2006 ABC FALSE

I am trying to find a formula to place in Col C of data set 2 that will
return true if the month and year are the same. Is it possible ?

Thank you in advance.
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

If both values are XL dates, but the data in Set1 is formatted as
yyyymm, then you can compare them directly.

If the date in Set1 is instead a value or text 200503, then you can
compare the text values.

Say Set1 is text "200503" and is in Sheet1!A:B, and Set2 is in
Sheet2!A:C. Then

Sheet2!C2: =TEXT(A2,"yyyymm") = Sheet1!A2


If instead Set1 has numeric values, 200503, then use two unary minus
operators to coerce the text into numbers

Sheet2!C2: =--TEXT(A1,"yyyymm") = Sheet!A2


In article ,
"carl" wrote:

I have data from 2 sources. I would like to match up the data that is tagged
with the same month and year data. For example:

data set 1

Date Product
200503 ABC

data set 2

ColA ColB ColC
Date Product
3/18/2005 ABC TRUE
5/15/2006 ABC FALSE

I am trying to find a formula to place in Col C of data set 2 that will
return true if the month and year are the same. Is it possible ?

Thank you in advance.

  #4   Report Post  
David McRitchie
 
Posts: n/a
Default

Hi Carl,
It sometimes gets you a quicker answer if you show how far you got.
Assuming that your regional short date format is ordered as mm/dd/yy

=1<=COUNTIF('carl_1'!A:A,YEAR(A2)*100+MONTH(A2))

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"carl" wrote in message ...
I have data from 2 sources. I would like to match up the data that is tagged
with the same month and year data. For example:

data set 1

Date Product
200503 ABC

data set 2

ColA ColB ColC
Date Product
3/18/2005 ABC TRUE
5/15/2006 ABC FALSE

I am trying to find a formula to place in Col C of data set 2 that will
return true if the month and year are the same. Is it possible ?

Thank you in advance.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ploting dates against a calendar and not as a simple events Barb Reinhardt Charts and Charting in Excel 2 January 22nd 05 02:41 AM
pasted dates changing rubber Excel Discussion (Misc queries) 1 January 12th 05 12:38 PM
Formating Dates for production schedule dpl7579 Excel Discussion (Misc queries) 1 January 11th 05 08:43 PM
due dates Niki New Users to Excel 4 January 10th 05 04:11 PM
I get wrong dates when i paste from a different sheet into a new s mmollat Excel Discussion (Misc queries) 2 January 6th 05 07:35 PM


All times are GMT +1. The time now is 02:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"