Error Matching Date

Ark68

Well-known Member
Joined
Mar 23, 2004
Messages
3,860
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Code:
dt_ref_rw = Application.WorksheetFunction.Match(sosdt, ws_master.Columns(1), 0)

This match code isn't finding the match, instead it's giving me an error ... "Unable to get the match property of the WorksheetFunction Class"

sosdt is declared as a date and in my testing = 2020-05-13
worksheet ws_master, column A holds all dates between January 1, 2020 and December 31, 2020. Although formatted as dd-mmm, the values are true dates. May 13, 2020 is at row 150.
 

Some videos you may like

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
12,495
Office Version
  1. 365
Platform
  1. Windows
Try declaring sosdt as Double instead of Date.
 

Ark68

Well-known Member
Joined
Mar 23, 2004
Messages
3,860
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Thank you Jason. That was what I needed.
 

Watch MrExcel Video

Forum statistics

Threads
1,128,061
Messages
5,628,369
Members
416,314
Latest member
Dan99321

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
Top