index / match on date value

projectile

Board Regular
Joined
Dec 14, 2007
Messages
193
Hello

We have an ODBC dump of data (whcih gets refreshed each time sheet is opened), which includes a time stamp column, that displayss date in this format 2008-09-08 10:52:32

Now, on another sheet where the user types in a date in UK format e.g. 08/09/2008

We are looking for a formula that looks at the date entered in UK format (e.g. 08/09/2009 ) and matches this date only entered against ODBC time stamp in sheet2 column 2008-09-08 10:52:32, then returns adjustant value e.g. Rate of Exchange .

Please you advise how this is possible

We have tried to extract date from the ODBC dump using =DAY(B2) & "/" & MONTH(B2) & "/" & YEAR(B2) , however the index / match formula returns N/A

e.g. =INDEX(ROE!D:D,MATCH(DATEVALUE(B2),ROE!G:G,0))

in this forumla DATEVALUE(B2) is the field the user keys in a date

ROE!G:G is the ODBC date column in this format 2008-09-08 10:52:32

ROE!D:D column is the ODBC Rate of exhchange we want to return

Hope this make sense.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Tried the int(B2) , but couldn't get to work,

Managed to get it working, however the user must enter the date without leading zeros, otherwise the match doesn't work.

Here is the method used;

in B2 (sheet called June) , set the field to TEXT in format. Enter this date 9/9/2008


in L2 (sheet called June) , entered this formula

=INDEX(Sheet1!$D:$D,MATCH(B2,Sheet1!$F:$F,0))

in sheet1 in column F, ran this formula down;

=DAY(B1) & "/" & MONTH(B1) & "/" & YEAR(B1)

This extracts the date only from the time stamp.



My question now is, is there a more efficient way to perform the above, so if the user enters 09/09/2008 (with leading zeros) it is able to do the match?
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,827
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top